Class PosixPermissionsSelector

  • All Implemented Interfaces:
    ResourceSelector, FileSelector

    public class PosixPermissionsSelector
    extends java.lang.Object
    implements 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.

    Ant 1.10.4
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isSelected​( basedir, java.lang.String filename, 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PosixPermissionsSelector

        public PosixPermissionsSelector()
    • Method Detail

      • setPermissions

        public void setPermissions​(java.lang.String permissions)
        Sets the permissions to look for.
        permissions - the permissions string (rwxrwxrwx or octal)
      • setFollowSymlinks

        public void setFollowSymlinks​(boolean followSymlinks)
        Sets the "follow symbolic links" flag.
        followSymlinks - whether or not symbolic links should be followed.
      • isSelected

        public boolean isSelected​( basedir,
                                  java.lang.String filename,
        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 interface FileSelector
        basedir - A object for the base directory
        filename - The name of the file to check
        file - A File object for this filename
        whether the file should be selected or not