Class FileAccessPermission
java.lang.Object
org.aesh.readline.util.FileAccessPermission
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the file is executable.booleanChecks if executable permission is owner only.booleanChecks if the file is readable.booleanChecks if readable permission is owner only.booleanChecks if the file is writable.booleanChecks if writable permission is owner only.voidsetExecutable(boolean executable) Sets the executable permission.voidsetExecutableOwnerOnly(boolean executableOwnerOnly) Sets whether executable permission is owner only.voidsetReadable(boolean readable) Sets the readable permission.voidsetReadableOwnerOnly(boolean readableOwnerOnly) Sets whether readable permission is owner only.voidsetWritable(boolean writable) Sets the writable permission.voidsetWritableOwnerOnly(boolean writableOwnerOnly) Sets whether writable permission is owner only.
-
Constructor Details
-
FileAccessPermission
public FileAccessPermission()Default constructor
-
-
Method Details
-
isExecutable
public boolean isExecutable()Checks if the file is executable.- Returns:
- the executable flag
-
setExecutable
public void setExecutable(boolean executable) Sets the executable permission.- Parameters:
executable- the executable flag to set
-
isExecutableOwnerOnly
public boolean isExecutableOwnerOnly()Checks if executable permission is owner only.- Returns:
- the executableOwnerOnly flag
-
setExecutableOwnerOnly
public void setExecutableOwnerOnly(boolean executableOwnerOnly) Sets whether executable permission is owner only.- Parameters:
executableOwnerOnly- the executableOwnerOnly flag to set
-
isReadable
public boolean isReadable()Checks if the file is readable.- Returns:
- the readable flag
-
setReadable
public void setReadable(boolean readable) Sets the readable permission.- Parameters:
readable- the readable flag to set
-
isReadableOwnerOnly
public boolean isReadableOwnerOnly()Checks if readable permission is owner only.- Returns:
- the readableOwnerOnly flag
-
setReadableOwnerOnly
public void setReadableOwnerOnly(boolean readableOwnerOnly) Sets whether readable permission is owner only.- Parameters:
readableOwnerOnly- the readableOwnerOnly flag to set
-
isWritable
public boolean isWritable()Checks if the file is writable.- Returns:
- the writable flag
-
setWritable
public void setWritable(boolean writable) Sets the writable permission.- Parameters:
writable- the writable flag to set
-
isWritableOwnerOnly
public boolean isWritableOwnerOnly()Checks if writable permission is owner only.- Returns:
- the writableOwnerOnly flag
-
setWritableOwnerOnly
public void setWritableOwnerOnly(boolean writableOwnerOnly) Sets whether writable permission is owner only.- Parameters:
writableOwnerOnly- the writableOwnerOnly flag to set
-