Structureswift-nio 2.72.0_NIOFileSystem
FileHandle
Implements FileHandleProtocol
by making system calls to interact with the local file system.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
struct FileHandle
See also
struct FileSystem
A file system which interacts with the local system. The file system uses a thread pool to perform system calls.
struct ReadFileHandle
Implements
ReadableFileHandleProtocol
by making system calls to interact with the local file system.struct WriteFileHandle
Implements
WritableFileHandleProtocol
by making system calls to interact with the local file system.struct ReadWriteFileHandle
Implements
ReadableAndWritableFileHandleProtocol
by making system calls to interact with the local file system.struct DirectoryFileHandle
Implements
DirectoryFileHandleProtocol
by making system calls to interact with the local file system.func withFileSystem<Result>(numberOfThreads: Int, (FileSystem) async throws -> Result
) async throws -> Result Provides temporary scoped access to a
FileSystem
with the given number of threads.
Citizens in _NIOFileSystem
Conformances
protocol FileHandleProtocol
A handle for a file system object.
Instance members
func addPermissions(FilePermissions
) async throws -> FilePermissions func attributeNames(
) async throws -> [String] func close(
) async throws func detachUnsafeFileDescriptor(
) throws -> FileDescriptor func info(
) async throws -> FileInfo func removePermissions(FilePermissions
) async throws -> FilePermissions func removeValueForAttribute(String
) async throws func replacePermissions(FilePermissions
) async throws func setTimes(lastAccess: FileInfo.Timespec?, lastDataModification: FileInfo.Timespec?
) async throws func synchronize(
) async throws func updateValueForAttribute(some (Sendable & RandomAccessCollection<UInt8>), attribute: String
) async throws func valueForAttribute(String
) async throws -> [UInt8] func withUnsafeDescriptor<R>(@escaping (FileDescriptor) throws -> R
) async throws -> R
Instance features
func setLastAccessTime(to: FileInfo.Timespec
) async throws Sets the file’s last access time to the given time.
func setLastDataModificationTime(to: FileInfo.Timespec
) async throws Sets the file’s last data modification time to the given time.
func touch(
) async throws Sets the file’s last access and last data modification times to the current time.