Skip to main content

read_file_limited

Function read_file_limited 

Source
fn read_file_limited(path: &str) -> Result<Option<Vec<u8>>, ()>
Expand description

A file’s text, whatever it is: a regular file, a named pipe, /dev/stdin, a process substitution. gh reads those too, so the scan must. Ok(None) for a path that isn’t there or is a directory (gh says so itself); Err when there is more than the scan reads.