Deletes a file or directory, or set of files defined by a fileset.
The original delete task would delete a file, or a set of files
using the include/exclude syntax. The deltree task would delete a
directory tree. This task combines the functionality of these two
originally distinct tasks.
Currently Delete extends MatchingTask. This is intended only
to provide backwards compatibility for a release. The future position
is to use nested filesets exclusively.
setIncludesfile(File includesfile) Sets the name of the file containing the includes patterns.
public void
setQuiet(boolean quiet) If true and the file does not exist, do not display a diagnostic
message or modify the exit status to reflect an error.
This means that if a file or directory cannot be deleted,
then no error is reported.
public void
setVerbose(boolean verbose) If true, list all names of deleted files.
remove an array of files in a directory, and a list of subdirectories
which will only be deleted if 'includeEmpty' is true
Parameters: d - directory to work from Parameters: files - array of files to delete; can be of zero length Parameters: dirs - array of directories to delete; can of zero length
setCaseSensitive
public void setCaseSensitive(boolean isCaseSensitive)(Code)
Sets case sensitivity of the file system
Parameters: isCaseSensitive - "true"|"on"|"yes" if file system is casesensitive, "false"|"off"|"no" when not.
setDefaultexcludes
public void setDefaultexcludes(boolean useDefaultExcludes)(Code)
Sets whether default exclusions should be used or not.
Parameters: useDefaultExcludes - "true"|"on"|"yes" when default exclusionsshould be used, "false"|"off"|"no" when theyshouldn't be used.
setDeleteOnExit
public void setDeleteOnExit(boolean deleteOnExit)(Code)
If true, on failure to delete, note the error and set
the deleteonexit flag, and continue
Parameters: deleteOnExit - true or false
Sets the set of exclude patterns. Patterns may be separated by a comma
or a space.
Parameters: excludes - the string containing the exclude patterns
setExcludesfile
public void setExcludesfile(File excludesfile)(Code)
Sets the name of the file containing the includes patterns.
Parameters: excludesfile - A string containing the filename to fetchthe include patterns from.
setFailOnError
public void setFailOnError(boolean failonerror)(Code)
If false, note errors but continue.
Parameters: failonerror - true or false
Sets the set of include patterns. Patterns may be separated by a comma
or a space.
Parameters: includes - the string containing the include patterns
setIncludesfile
public void setIncludesfile(File includesfile)(Code)
Sets the name of the file containing the includes patterns.
Parameters: includesfile - A string containing the filename to fetchthe include patterns from.
If true and the file does not exist, do not display a diagnostic
message or modify the exit status to reflect an error.
This means that if a file or directory cannot be deleted,
then no error is reported. This setting emulates the
-f option to the Unix "rm" command.
Default is false meaning things are "noisy"
Parameters: quiet - "true" or "on"