std.fs.open_read

std.fs

open_read(path) -> fd, err

Open a file to read, without blocking

Opens path read-only, close-on-exec and non-blocking, and returns the raw fd. A FIFO opens at once instead of waiting for a writer. Check the fd with fstat before a read, and close it with close.