Class PosixPermissionsSelector
java.lang.Object
org.apache.tools.ant.types.selectors.PosixPermissionsSelector
- All Implemented Interfaces:
ResourceSelector
,FileSelector
A selector that selects files based on their POSIX permissions.
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.
- Since:
- Ant 1.10.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isSelected
(File basedir, String filename, 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
(String permissions) Sets the permissions to look for.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.tools.ant.types.selectors.FileSelector
isSelected
-
Constructor Details
-
PosixPermissionsSelector
public PosixPermissionsSelector()
-
-
Method Details
-
setPermissions
Sets the permissions to look for.- Parameters:
permissions
- the permissions string (rwxrwxrwx or octal)
-
setFollowSymlinks
public void setFollowSymlinks(boolean followSymlinks) Sets the "follow symbolic links" flag.- Parameters:
followSymlinks
- whether or not symbolic links should be followed.
-
isSelected
Description copied from interface:FileSelector
Method that each selector will implement to create their selection behaviour. If there is a problem with the setup of a selector, it can throw a BuildException to indicate the problem.- Specified by:
isSelected
in interfaceFileSelector
- Parameters:
basedir
- A java.io.File object for the base directoryfilename
- The name of the file to checkfile
- A File object for this filename- Returns:
- whether the file should be selected or not
-