| Constructor and Description |
|---|
FileModeImpl(int mode)
Creates the mode of a file.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMode()
Returns the mode as number including all octals.
|
String |
getOctal()
Returns the mode as an octal number consisting only of the last 3 octals.
|
int |
getStickyBit()
Returns the sticky bit.
|
String |
getText()
Returns the mode as textual representation excluding the "sticky
bit".
|
boolean |
isGroupExecutable()
Returns the flag if the group can execute the file.
|
boolean |
isGroupReadable()
Returns the flag if the group can read the file.
|
boolean |
isGroupWriteable()
Returns the flag if the group can write the file.
|
boolean |
isOtherExecutable()
Returns the flag if the others can execute the file.
|
boolean |
isOtherReadable()
Returns the flag if the others can read the file.
|
boolean |
isOtherWriteable()
Returns the flag if the others can write the file.
|
boolean |
isOwnerExecutable()
Returns the flag if the owner can execute the file.
|
boolean |
isOwnerReadable()
Returns the flag if the owner can read the file.
|
boolean |
isOwnerWriteable()
Returns the flag if the owner can write the file.
|
public FileModeImpl(int mode)
Creates the mode of a file.
mode - The mode: A number from octal 00000 (decimal: 0) to octal
777777 (decimal: 262143).public int getMode()
FileModeReturns the mode as number including all octals.
public String getOctal()
FileModeReturns the mode as an octal number consisting only of the last 3 octals.
The returned value may look like this:
777 or like this:
000
public String getText()
FileModeReturns the mode as textual representation excluding the "sticky bit".
The returned value may look like this:
rwxrwxrwx or like this:
---------
public int getStickyBit()
FileModeReturns the sticky bit.
See Changing permission behavior with setuid, setgid, and sticky bits for more information.
getStickyBit in interface FileModepublic boolean isOwnerReadable()
FileModeReturns the flag if the owner can read the file.
isOwnerReadable in interface FileModetrue, if the owner can, false
otherwise.public boolean isOwnerWriteable()
FileModeReturns the flag if the owner can write the file.
isOwnerWriteable in interface FileModetrue, if the owner can, false
otherwise.public boolean isOwnerExecutable()
FileModeReturns the flag if the owner can execute the file.
isOwnerExecutable in interface FileModetrue, if the owner can, false
otherwise.public boolean isGroupReadable()
FileModeReturns the flag if the group can read the file.
isGroupReadable in interface FileModetrue, if the group can, false
otherwise.public boolean isGroupWriteable()
FileModeReturns the flag if the group can write the file.
isGroupWriteable in interface FileModetrue, if the group can, false
otherwise.public boolean isGroupExecutable()
FileModeReturns the flag if the group can execute the file.
isGroupExecutable in interface FileModetrue, if the group can, false
otherwise.public boolean isOtherReadable()
FileModeReturns the flag if the others can read the file.
isOtherReadable in interface FileModetrue, if the others can,
false otherwise.public boolean isOtherWriteable()
FileModeReturns the flag if the others can write the file.
isOtherWriteable in interface FileModetrue, if the others can,
false otherwise.public boolean isOtherExecutable()
FileModeReturns the flag if the others can execute the file.
isOtherExecutable in interface FileModetrue, if the others can,
false otherwise.Copyright © 2015–2019. All rights reserved.