public class PosixPermissionsSelector extends java.lang.Object implements FileSelector
Permissions are defined in terms of Files.getPosixFilePermissions(java.nio.file.Path, java.nio.file.LinkOption...)
, this means the selector will accept
any file that exists and has given POSIX permissions.
Constructor and Description |
---|
PosixPermissionsSelector() |
Modifier and Type | Method and Description |
---|---|
boolean |
isSelected(java.io.File basedir,
java.lang.String filename,
java.io.File file)
Method that each selector will implement to create their
selection behaviour.
|
void |
setFollowSymlinks(boolean followSymlinks)
Sets the "follow symbolic links" flag.
|
void |
setPermissions(java.lang.String permissions)
Sets the permissions to look for.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSelected
public void setPermissions(java.lang.String permissions)
permissions
- the permissions string (rwxrwxrwx or octal)public void setFollowSymlinks(boolean followSymlinks)
followSymlinks
- whether or not symbolic links should be followed.public boolean isSelected(java.io.File basedir, java.lang.String filename, java.io.File file)
FileSelector
isSelected
in interface FileSelector
basedir
- A java.io.File object for the base directoryfilename
- The name of the file to checkfile
- A File object for this filename