FilePermissions
public class FilePermissions : CustomStringConvertible
Represents the permissions on a file
-
User permissions
Declaration
Swift
public var user: PermissionBits
-
Group permissions
Declaration
Swift
public var group: PermissionBits
-
Other permissions
Declaration
Swift
public var other: PermissionBits
-
Init from
PermissionBit
sDeclaration
Swift
public required init(user: PermissionBits, group: PermissionBits, other: PermissionBits)
Parameters
user
user permissions
group
group permissions
other
other permissions
-
Init from an integer, either decimal or octal.
To use an octal representation, such as 755 enter
0o755
.To use an decimal representation, such as 488 enter
488
.Declaration
Swift
public convenience init(_ number: Int)
Parameters
number
number representation of the permissions
-
The permissions octal, e.g. 755
Declaration
Swift
public var octal: String { get }
-
Decimal representation of the permissions, e.g. 488
Declaration
Swift
public var decimal: Int { get }
-
Symbolic representation of the permissions, e.g. -rwxr-xr-x
Declaration
Swift
public var symbolic: String { get }
-
The symbolic representation of the permissions
Declaration
Swift
public var description: String { get }
-
Init from an umask integer, either decimal or octal.
Each digit in the octal is subtracted from 7 to get its value.
To use an octal representation, such as 027 enter
0o027
.To use an decimal representation, such as 23 enter
23
.Declaration
Swift
public convenience init(umask number: Int)
Parameters
number
number representation of the permissions
-
The umask octal, e.g. 027
Declaration
Swift
public var umaskOctal: String { get }
-
Decimal representation of the umask octal, e.g. 23
Declaration
Swift
public var umaskDecimal: Int { get }