openAt
Open a file or directory.
The returned descriptor is not guaranteed to be the lowest-numbered 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 descriptor is guaranteed to be less than 2**31.
If flags
contains DescriptorFlags.mutateDirectory, and the base descriptor doesn't have DescriptorFlags.mutateDirectory set, openAt
fails with ErrorCode.READ_ONLY.
If flags
contains DescriptorFlags.write, or openFlags
contains OpenFlags.truncate or OpenFlags.create, and the base descriptor doesn't have DescriptorFlags.mutateDirectory set, openAt
fails with ErrorCode.READ_ONLY.
Note: This is similar to openat
in POSIX.
TODO Support modes
Parameters
The relative path of the object to open.
Reference to the parent directory where the new one should be created.
The method by which to open the file.
Flags to use for the resulting descriptor.
Flags determining the method of how the path is resolved.