WritableSelector (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.types.selectors, class: WritableSelector

# Class WritableSelector

java.lang.Object
org.apache.tools.ant.types.selectors.WritableSelector

All Implemented Interfaces:
  `ResourceSelector, FileSelector`

public class WritableSelector extends Object implements FileSelector
A selector that selects writable files.

Writable is defined in terms of java.io.File#canWrite, this means the selector will accept any file that exists and is writable by the application.

Since:
  Ant 1.8.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WritableSelector()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isSelected(File basedir, String filename, File file)`
  Method that each selector will implement to create their selection behaviour.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface FileSelector

  `isSelected`
  Modifier and Type
  Method
  Description
  `default boolean`
  `isSelected(Resource r)`
  Implement a basic `Resource` selection that delegates to this `FileSelector`.

- ## Constructor Details

  - ### WritableSelector

    public WritableSelector()

- ## Method Details

  - ### isSelected

    public boolean isSelected(File basedir, String filename, File file)
    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`
    Parameters:
      `basedir` - A java.io.File object for the base directory
      `filename` - The name of the file to check
      `file` - A File object for this filename
    Returns:
      whether the file should be selected or not