FileMode¶
This stores a UNIX-style mode broken out into a Bool for each bit. For other operating systems, the mapping will be approximate. For example, on Windows, if the file is readable all the read Bools will be set, and if the file is writeable, all the write Bools will be set.
The default mode is read/write for the owner, read-only for everyone else.
Constructors¶
create¶
Returns¶
- FileMode iso^
Public fields¶
var setuid: Bool val¶
true
if the SETUID bit is set.
var setgid: Bool val¶
true
if the SETGID bit is set.
var sticky: Bool val¶
true
if the sticky bit is set.
var owner_read: Bool val¶
true
if the owning user can read the file.
var owner_write: Bool val¶
true
if the owning user can write to the file.
var owner_exec: Bool val¶
true
if the owning user can execute the file.
var group_read: Bool val¶
true
if members of the owning group can read the file.
var group_write: Bool val¶
true
if members of the owning group can write to the file.
var group_exec: Bool val¶
true
if members of the owning group can execute the file.
var any_read: Bool val¶
true
if every user can read the file.
var any_write: Bool val¶
true
if every user can write to the file.
var any_exec: Bool val¶
`true if every user can execute the file.
Public Functions¶
exec¶
Set the executable flag for everyone.
Returns¶
- None val
shared¶
Set the write flag for everyone to the same as owner_write.
Returns¶
- None val
group¶
Clear all of the any-user flags.
Returns¶
- None val
private¶
Clear all of the group and any-user flags.
Returns¶
- None val
u32¶
Get the OS specific integer for a file mode. On Windows, if any read flag is set, the path is made readable, and if any write flag is set, the path is made writeable.
Returns¶
- U32 val