One Logo Pool Ball
System · IOS API REFERENCE

FileType

struct · iOS 27.0+ · SDK 27.1

@frozen struct FileType

A file type matching those contained in a C `mode_t`. - Note: Only available on Unix-like platforms.

Members (11)

get · iOS 27.0+

blockSpecial

TypeScript
get blockSpecial(): FileType
Swift declaration
static var blockSpecial: FileType { get }

Block special device The corresponding C constant is `S_IFBLK`.

get · iOS 27.0+

symbolicLink

TypeScript
get symbolicLink(): FileType
Swift declaration
static var symbolicLink: FileType { get }

Symbolic link The corresponding C constant is `S_IFLNK`.

get · iOS 27.0+

characterSpecial

TypeScript
get characterSpecial(): FileType
Swift declaration
static var characterSpecial: FileType { get }

Character special device The corresponding C constant is `S_IFCHR`.

get · iOS 27.0+

fifo

TypeScript
get fifo(): FileType
Swift declaration
static var fifo: FileType { get }

FIFO (or named pipe) The corresponding C constant is `S_IFIFO`.

get · iOS 27.0+

socket

TypeScript
get socket(): FileType
Swift declaration
static var socket: FileType { get }

Socket The corresponding C constant is `S_IFSOCK`.

get · iOS 27.0+

regular

TypeScript
get regular(): FileType
Swift declaration
static var regular: FileType { get }

Regular file The corresponding C constant is `S_IFREG`.

init · iOS 27.0+

init

TypeScript
init(rawValue: SDKHandle): FileType
Swift declaration
init(rawValue: CInterop.Mode)

Creates a strongly-typed file type from the raw C `mode_t`. - Note: This initializer stores the `rawValue` directly and **does not** mask the value with `S_IFMT`. If the supplied `rawValue` contains bits outside of the `S_IFMT` mask, the resulting `FileType` will not compare equal to constants like `.directory` and `.symbolicLink`, which may be unexpected. If you're unsure whether the `mode_t` contains bits outside of `S_IFMT`, you can use `FileMode(rawValue:)` instead to get a strongly-typed `FileMode`, then call `.type` to get the properly masked `FileType`.

get · iOS 27.0+

rawValue

TypeScript
getRawValue($self: FileType): SDKHandle
Swift declaration
var rawValue: CInterop.Mode

The raw file-type bits from the C mode.

set · iOS 27.0+

rawValue

TypeScript
setRawValue($self: FileType, value: SDKHandle): void
Swift declaration
var rawValue: CInterop.Mode

The raw file-type bits from the C mode.

get · iOS 27.0+

whiteout

TypeScript
get whiteout(): FileType
Swift declaration
static var whiteout: FileType { get }

Whiteout file The corresponding C constant is `S_IFWHT`.

get · iOS 27.0+

directory

TypeScript
get directory(): FileType
Swift declaration
static var directory: FileType { get }

Directory The corresponding C constant is `S_IFDIR`.

Skipped declarations

No declarations were skipped in this snapshot.

All System types →