Enumerationswift-nio 2.84.0_NIOFileSystem
UpdatePermissionsOperation
SystemFileHandle.swift:374This declaration is gated by at least one @_spi attribute.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
enum UpdatePermissionsOperation
This declaration is gated by at least one @_spi attribute.
enum UpdatePermissionsOperation
s14_NIOFileSystem0B10FileHandleC26UpdatePermissionsOperationO
What are these?4TLLN
import _NIOFileSystem
A file system library for Swift.
final class SystemFileHandle
An implementation of FileHandleProtocol
which is backed by system calls and a file descriptor.
case set
case add
case remove
init(takingOwnershipOf descriptor: FileDescriptor, path: FilePath, materialization: SystemFileHandle.Materialization? = nil, threadPool: NIOThreadPool)
Creates a handle which takes ownership of the provided descriptor.
static func syncOpenWithMaterialization(atPath path: FilePath, mode: FileDescriptor.AccessMode, options originalOptions: FileDescriptor.OpenOptions, permissions: FilePermissions?, threadPool: NIOThreadPool, useTemporaryFileIfPossible: Bool = true) -> Result<SystemFileHandle, FileSystemError>
let sendableView: SystemFileHandle.SendableView
func addPermissions(_ permissions: FilePermissions) async throws -> FilePermissions
func attributeNames() async throws -> [String]
func close() async throws
func close(makeChangesVisible: Bool) async throws
func detachUnsafeFileDescriptor() throws -> FileDescriptor
func info() async throws -> FileInfo
func listContents(recursive: Bool) -> DirectoryEntries
func openDirectory(atPath path: FilePath, options: OpenOptions.Directory) async throws -> SystemFileHandle
func openFile(forReadingAndWritingAt path: FilePath, options: OpenOptions.Write) async throws -> SystemFileHandle
func openFile(forReadingAt path: FilePath, options: OpenOptions.Read) async throws -> SystemFileHandle
func openFile(forWritingAt path: FilePath, options: OpenOptions.Write) async throws -> SystemFileHandle
func readChunk(fromAbsoluteOffset offset: Int64, length: ByteCount) async throws -> ByteBuffer
func readChunks(in range: Range<Int64>, chunkLength size: ByteCount) -> FileChunks
func removePermissions(_ permissions: FilePermissions) async throws -> FilePermissions
func removeValueForAttribute(_ name: String) async throws
func replacePermissions(_ permissions: FilePermissions) async throws
func resize(to size: ByteCount) async throws
func setTimes(lastAccess: FileInfo.Timespec?, lastDataModification: FileInfo.Timespec?) async throws
func synchronize() async throws
func updateValueForAttribute(_ bytes: some RandomAccessCollection<UInt8> & Sendable, attribute name: String) async throws
func valueForAttribute(_ name: String) async throws -> [UInt8]
func withUnsafeDescriptor<R>(_ execute: @escaping (FileDescriptor) throws -> R) async throws -> R where R : Sendable
@discardableResult func write(contentsOf bytes: some Sendable & Sequence<UInt8>, toAbsoluteOffset offset: Int64) async throws -> Int64
struct Materialization
struct SendableView
The file handle may be for a non-seekable file, so it shouldn’t be ‘Sendable’, however, most of the work performed on behalf of the handle is executed in a thread pool which means that its state must be ‘Sendable’.
typealias ReadFileHandle = SystemFileHandle
typealias ReadWriteFileHandle = SystemFileHandle
typealias WriteFileHandle = SystemFileHandle
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.