File permissions in specify whether a file can be read, written, or executed by its owner, its owning group, and everyone else. Instances of this type can be constructed by combining individual file permissions with the | operator:

ReadOwner | WriteOwner | ReadGroup | ReadOthers

Alternatively, file permissions may be specified as a string with exactly 9 characters, in the format rwxrwxrwx, where each letter may instead be a - character. The first three characters represent the permissions of the owner, the second three characters represent the permissions of the owning group, and the last three characters represent the permissions of everyone else.

"rw-r--r--"

Finally, file permissions may be constructed from an octal representation using the fromOctal function.

FilePermissions.fromOctal("644")

Variables

@:value(cast 1 << 3)@:enum@:implinlineread onlyExecuteGroup:FilePermissions = 1 << 3

@:value(cast 1 << 0)@:enum@:implinlineread onlyExecuteOthers:FilePermissions = 1 << 0

@:value(cast 1 << 6)@:enum@:implinlineread onlyExecuteOwner:FilePermissions = 1 << 6

@:value(cast 0)@:enum@:implinlineread onlyNone:FilePermissions = 0

@:value(cast 1 << 5)@:enum@:implinlineread onlyReadGroup:FilePermissions = 1 << 5

@:value(cast 1 << 2)@:enum@:implinlineread onlyReadOthers:FilePermissions = 1 << 2

@:value(cast 1 << 8)@:enum@:implinlineread onlyReadOwner:FilePermissions = 1 << 8

@:value(cast 1 << 4)@:enum@:implinlineread onlyWriteGroup:FilePermissions = 1 << 4

@:value(cast 1 << 1)@:enum@:implinlineread onlyWriteOthers:FilePermissions = 1 << 1

@:value(cast 1 << 7)@:enum@:implinlineread onlyWriteOwner:FilePermissions = 1 << 7

Static methods

staticfromOctal (s:String):FilePermissions

@:fromstaticfromString (s:String):FilePermissions