withFileStream(path:mode:options:permissions:_:)
Calls the given closure with a file stream.
Declaration
static func withFileStream<E>(path: FilePath, mode: FileDescriptor.AccessMode, options: FileDescriptor.OpenOptions, permissions: FilePermissions, _ body: (ArchiveByteStream) throws -> E) throws -> EParameters
- path:
The file path.
- mode:
The file descriptor access mode.
- options:
The file descriptor options that specify behavior on opening a file.
- permissions:
The file permission bits that govern access to a file.
- body:
A closure with the archive byte stream passed as a parameter.
Return Value
The result of the closure.