Code
A high level indication of the kind of error being thrown.
struct Code
A high level indication of the kind of error being thrown.
struct Code
import _NIOFileSystem
A file system library for Swift.
struct FileSystemError
An error thrown as a result of interaction with the file system.
init(code: Code, message: String, cause: Error?, location: SourceLocation)
static func close(error: Error, path: FilePath, location: SourceLocation) -> FileSystemError
static func confstr(name: String, errno: Errno, location: SourceLocation) -> FileSystemError
static func copyfile(errno: Errno, from sourcePath: FilePath, to destinationPath: FilePath, location: SourceLocation) -> FileSystemError
static func dup(error: Error, path: FilePath, location: SourceLocation) -> FileSystemError
static func fchmod(operation: SystemFileHandle.UpdatePermissionsOperation, operand: FilePermissions, permissions: FilePermissions, errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func fcopyfile(errno: Errno, from sourcePath: FilePath, to destinationPath: FilePath, location: SourceLocation) -> FileSystemError
static func fdopendir(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func fgetxattr(attribute name: String, errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func flistxattr(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func fremovexattr(attribute name: String, errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func fsetxattr(attribute name: String, errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func fsync(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func ftruncate(error: Error, path: FilePath, location: SourceLocation) -> FileSystemError
static func ftsRead(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func futimens(errno: Errno, path: FilePath, lastAccessTime: FileInfo.Timespec?, lastDataModificationTime: FileInfo.Timespec?, location: SourceLocation) -> FileSystemError
static func getcwd(errno: Errno, location: SourceLocation) -> FileSystemError
static func link(errno: Errno, from sourcePath: FilePath, to destinationPath: FilePath, location: SourceLocation) -> FileSystemError
static func mkdir(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func open(_ name: String, error: Error, path: FilePath, location: SourceLocation) -> FileSystemError
static func read(usingSyscall syscall: ReadSyscall, error: Error, path: FilePath, location: SourceLocation) -> FileSystemError
static func readdir(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func readlink(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func remove(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func rename(_ name: String, errno: Errno, oldName: FilePath, newName: FilePath, location: SourceLocation) -> FileSystemError
static func sendfile(errno: Errno, from sourcePath: FilePath, to destinationPath: FilePath, location: SourceLocation) -> FileSystemError
static func stat(_ name: String, errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
Create a file system error appropriate for the stat
/lstat
/fstat
system calls.
static func symlink(errno: Errno, link: FilePath, target: FilePath, location: SourceLocation) -> FileSystemError
static func unlink(errno: Errno, path: FilePath, location: SourceLocation) -> FileSystemError
static func write(usingSyscall syscall: WriteSyscall, error: Error, path: FilePath, location: SourceLocation) -> FileSystemError
var cause: Error?
An underlying error which caused the operation to fail. This may include additional details about the root cause of the failure.
var code: Code
A high-level error code to provide broad a classification.
var debugDescription: String { get }
var description: String { get }
var location: SourceLocation
The location from which this error was thrown.
var message: String
A message describing what went wrong and how it may be remedied.
func detailedDescription() -> String
A detailed multi-line description of the error.
enum ReadSyscall
struct SourceLocation
A location within source code.
struct SystemCallError
An error resulting from a system call.
enum WriteSyscall
protocol CustomStringConvertible
A type with a customized textual representation.
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.
protocol Sendable
static var closed: Self { get }
An operation on the file could not be performed because the file is closed (or detached).
static var fileAlreadyExists: Self { get }
The file already exists.
static var invalidArgument: Self { get }
A provided argument was not valid for the operation.
static var io: Self { get }
An I/O error occurred.
static var notEmpty: Self { get }
The directory wasn’t empty.
static var notFound: Self { get }
The file could not be found.
static var permissionDenied: Self { get }
The caller did not have sufficient permission to perform the operation.
static var resourceExhausted: Self { get }
A required resource was exhausted.
static var unavailable: Self { get }
The file system is not currently available, for example if the underlying executor is not running.
static var unknown: Self { get }
The error is not known or may not have an appropriate classification. See cause
for more information about the error.
static var unsupported: Self { get }
The operation is not supported or is not enabled.
var description: String { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.