Initializerswift-nio 2.72.0_NIOFileSystem->NIOCore
init(contentsOf:maximumSizeAllowed:fileSystem:)
Reads the contents of the file at the path.
ByteBuffer+FileSystem.swift:26- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
init(contentsOf path: FilePath, maximumSizeAllowed: ByteCount, fileSystem: some FileSystemProtocol) async throws
Parameters
- path
The path of the file to read.
- maximumSizeAllowed
The maximum size of file which can be read, in bytes, as a
ByteCount
.- fileSystem
The
FileSystemProtocol
instance to use to read the file.
Other members in extension
Type members
init(contentsOf: FilePath, maximumSizeAllowed: ByteCount
) async throws Reads the contents of the file at the path using
FileSystem
.
Instance members
func write(toFileAt: FilePath, absoluteOffset: Int64, options: OpenOptions.Write
) async throws -> Int64 Writes the readable bytes of the
ByteBuffer
to a file.func write(toFileAt: FilePath, absoluteOffset: Int64, options: OpenOptions.Write, fileSystem: some FileSystemProtocol
) async throws -> Int64 Writes the readable bytes of the
ByteBuffer
to a file.