Instance Methodswift-nio 2.72.0_NIOFileSystem->_Concurrency
write(toFileAt:absoluteOffset:options:fileSystem:)
Writes the contents of the AsyncSequence
to a file.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
@discardableResult func write(toFileAt path: FilePath, absoluteOffset offset: Int64 = 0, options: OpenOptions.Write = .newFile(replaceExisting: false), fileSystem: some FileSystemProtocol) async throws -> Int64
Parameters
- path
The path of the file to write the contents of the sequence to.
- offset
The offset into the file to write to, defaults to zero.
- options
Options for opening the file, defaults to creating a new file.
- fileSystem
The
FileSystemProtocol
instance to use.
Returns
The number of bytes written to the file.
Other members in extension
Instance members
func write(toFileAt: FilePath, absoluteOffset: Int64, options: OpenOptions.Write
) async throws -> Int64 Writes the contents of the
AsyncSequence
to a file.