pathOpen

fnErrno pathOpen( Fd fd, LookupFlags dirFlags, const(char) * path, Size pathLen, OFlags oFlags, Rights rightsBase, Rights rightsInheriting, FdFlags fdFlags, Fd * openedFd, ) @importName("path_open")

Open a file or directory. The returned file descriptor is not guaranteed to be the lowest-numbered file descriptor not currently open; it is randomized to prevent applications from depending on making assumptions about indexes, since this is error-prone in multi-threaded contexts. The returned file descriptor is guaranteed to be less than 2**31.

Note

This is similar to openat in POSIX.