openFile(forReadingAt:options:)
Open the file at path
for reading.
- 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 readable handle to the opened file.
Errors
Error codes thrown include:
notFound
ifpath
doesn’t exist.
Implementation details
Uses the open(2)
system call.