Required Instance Methodswift-nio 2.72.0_NIOFileSystem
addPermissions(_:)
Adds permissions to the existing permissions set for the file.
FileHandleProtocol.swift:63- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
@discardableResult func addPermissions(_ permissions: FilePermissions) async throws -> FilePermissions
Parameters
- permissions
The permissions to add to the file.
Returns
The updated permissions.
This is equivalent to retrieving the permissions, merging them with the provided permissions and then replacing the permissions on the file.
See also
func replacePermissions(FilePermissions
) async throws Replaces the permissions set on the file.
func removePermissions(FilePermissions
) async throws -> FilePermissions Remove permissions from the existing permissions set for the file.
Other requirements
View members
Hide members
This section is hidden by default because it contains too many (10) members.
Instance members
func attributeNames(
) async throws -> [String] Returns an array containing the names of all extended attributes set on the file.
func close(
) async throws Closes the file handle.
func detachUnsafeFileDescriptor(
) throws -> FileDescriptor Detaches and returns the file descriptor from the handle.
func info(
) async throws -> FileInfo Returns information about the file.
func removeValueForAttribute(String
) async throws Removes the value for the named attribute if it exists.
func setTimes(lastAccess: FileInfo.Timespec?, lastDataModification: FileInfo.Timespec?
) async throws Sets the file’s last access and last data modification times to the given values.
func synchronize(
) async throws Synchronize modified data and metadata to a permanent storage device.
func updateValueForAttribute(some (Sendable & RandomAccessCollection<UInt8>), attribute: String
) async throws Replaces the value for the named attribute, creating it if it didn’t already exist.
func valueForAttribute(String
) async throws -> [UInt8] Returns the value for the named attribute if it exists;
nil
otherwise.func withUnsafeDescriptor<R>(@escaping (FileDescriptor) throws -> R
) async throws -> R Runs the provided callback with the file descriptor for this handle.