openFile(forReadingAt:options:)
Opens the file at path
for reading and returns a handle to it.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
func openFile(forReadingAt path: FilePath, options: OpenOptions.Read) async throws -> ReadFileHandle
Parameters
Returns
A read-only handle to the opened file.
If path
is a relative path then it is opened relative to the handle. The file being opened must already exist otherwise this function will throw a FileSystemError
with code notFound
.