Currently Delete extends MatchingTask. This is intended only to provide backwards compatibility for a release. The future position is to use nested filesets exclusively.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| protected File | |
| private static final ResourceSelector | |
| private boolean | |
| protected File | |
| private static FileUtils | |
| protected Vector | |
| protected boolean | |
| private boolean | |
| private boolean | |
| private Resources | |
| private boolean | |
| private static final ResourceComparator | |
| protected boolean | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(ResourceCollection
the filesystem-only ResourceCollection. rc)Add an arbitrary ResourceCollection to be deleted. |
| public void | add(FileSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addAnd(AndSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addContains(ContainsSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addContainsRegexp(ContainsRegexpSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addCustom(ExtendSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addDate(DateSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addDepend(DependSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addDepth(DepthSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addFilename(FilenameSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | |
| public void | addMajority(MajoritySelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addModified(ModifiedSelector
the selector to add selector)Overrides org. Implements org. |
| public void | addNone(NoneSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addNot(NotSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addOr(OrSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addPresent(PresentSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addSelector(SelectSelector
the selector to be added selector)Overrides org. Implements org. |
| public void | addSize(SizeSelector
the selector to be added selector)Overrides org. Implements org. |
| public PatternSet. | Returns: a NameEntry object to be configuredOverrides org. |
| public PatternSet. | Returns: a PatternFileNameEntry object to be configuredOverrides org. |
| public PatternSet. | Returns: a NameEntry object to be configuredOverrides org. |
| public PatternSet. | Returns: a PatternFileNameEntry object to be configuredOverrides org. |
| public PatternSet | Returns: PatternSet object to be configuredOverrides org. |
| private boolean | |
| public void | |
| private void | |
| private void | |
| private boolean | |
| protected void | |
| protected void | removeFiles(File
directory to work from d, String[] array of files to delete; can be of zero length files, String[] array of directories to delete; can of zero length dirs)remove an array of files in a directory, and a list of subdirectories which will only be deleted if 'includeEmpty' is true |
| public void | setCaseSensitive(boolean
"true"|"on"|"yes" if file system is case
sensitive, "false"|"off"|"no" when not. isCaseSensitive)Overrides org. |
| public void | setDefaultexcludes(boolean
"true"|"on"|"yes" when default exclusions
should be used, "false"|"off"|"no" when they
shouldn't be used. useDefaultExcludes)Overrides org. |
| public void | setDeleteOnExit(boolean
true or false deleteOnExit)If true, on failure to delete, note the error and set the deleteonexit flag, and continue |
| public void | |
| public void | setExcludes(String
the string containing the exclude patterns excludes)Overrides org. |
| public void | setExcludesfile(File
A string containing the filename to fetch
the include patterns from. excludesfile)Overrides org. |
| public void | |
| public void | |
| public void | setFollowSymlinks(boolean
whether or not symbolic links should be followed followSymlinks)Overrides org. |
| public void | setIncludeEmptyDirs(boolean
if true delete empty directories (only
for filesets). Default is false. includeEmpty)If true, delete empty directories. |
| public void | setIncludes(String
the string containing the include patterns includes)Overrides org. |
| public void | setIncludesfile(File
A string containing the filename to fetch
the include patterns from. includesfile)Overrides org. |
| public void | setPerformGcOnFailedDelete(boolean
boolean b)Whether to perform a garbage collection before retrying a failed delete. |
| public void | setQuiet(boolean
"true" or "on" quiet)If true and the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error. |
| public void | setRemoveNotFollowedSymlinks(boolean
boolean b)Sets whether the symbolic links that have not been followed shall be removed (the links, not the locations they point at). |
| public void |
| deleteOnExit | back to summary |
|---|---|
| private boolean deleteOnExit | |
| dir | back to summary |
|---|---|
| protected File dir | |
| EXISTS | back to summary |
|---|---|
| private static final ResourceSelector EXISTS | |
| failonerror | back to summary |
|---|---|
| private boolean failonerror | |
| file | back to summary |
|---|---|
| protected File file | |
| FILE_UTILS | back to summary |
|---|---|
| private static FileUtils FILE_UTILS | |
| filesets | back to summary |
|---|---|
| protected Vector<FileSet> filesets | |
| includeEmpty | back to summary |
|---|---|
| protected boolean includeEmpty | |
| performGc | back to summary |
|---|---|
| private boolean performGc | |
| quiet | back to summary |
|---|---|
| private boolean quiet | |
| rcs | back to summary |
|---|---|
| private Resources rcs | |
| removeNotFollowedSymlinks | back to summary |
|---|---|
| private boolean removeNotFollowedSymlinks | |
| REVERSE_FILESYSTEM | back to summary |
|---|---|
| private static final ResourceComparator REVERSE_FILESYSTEM | |
| usedMatchingTask | back to summary |
|---|---|
| protected boolean usedMatchingTask | |
| verbosity | back to summary |
|---|---|
| private int verbosity | |
| Delete | back to summary |
|---|---|
| public Delete() | |
| add | back to summary |
|---|---|
| public void add(ResourceCollection rc) Add an arbitrary ResourceCollection to be deleted.
| |
| add | back to summary |
|---|---|
| public void add(FileSelector selector) Overrides org. Implements org. add an arbitrary selector
| |
| addAnd | back to summary |
|---|---|
| public void addAnd(AndSelector selector) Overrides org. Implements org. add an "And" selector entry on the selector list
| |
| addContains | back to summary |
|---|---|
| public void addContains(ContainsSelector selector) Overrides org. Implements org. add a contains selector entry on the selector list
| |
| addContainsRegexp | back to summary |
|---|---|
| public void addContainsRegexp(ContainsRegexpSelector selector) Overrides org. Implements org. add a regular expression selector entry on the selector list
| |
| addCustom | back to summary |
|---|---|
| public void addCustom(ExtendSelector selector) Overrides org. Implements org. add an extended selector entry on the selector list
| |
| addDate | back to summary |
|---|---|
| public void addDate(DateSelector selector) Overrides org. Implements org. add a selector date entry on the selector list
| |
| addDepend | back to summary |
|---|---|
| public void addDepend(DependSelector selector) Overrides org. Implements org. add a depends selector entry on the selector list
| |
| addDepth | back to summary |
|---|---|
| public void addDepth(DepthSelector selector) Overrides org. Implements org. add a depth selector entry on the selector list
| |
| addFilename | back to summary |
|---|---|
| public void addFilename(FilenameSelector selector) Overrides org. Implements org. add a selector filename entry on the selector list
| |
| addFileset | back to summary |
|---|---|
| public void addFileset(FileSet set) Adds a set of files to be deleted.
| |
| addMajority | back to summary |
|---|---|
| public void addMajority(MajoritySelector selector) Overrides org. Implements org. add a majority selector entry on the selector list
| |
| addModified | back to summary |
|---|---|
| public void addModified(ModifiedSelector selector) Overrides org. Implements org. add the modified selector
| |
| addNone | back to summary |
|---|---|
| public void addNone(NoneSelector selector) Overrides org. Implements org. add a "None" selector entry on the selector list
| |
| addNot | back to summary |
|---|---|
| public void addNot(NotSelector selector) Overrides org. Implements org. add a "Not" selector entry on the selector list
| |
| addOr | back to summary |
|---|---|
| public void addOr(OrSelector selector) Overrides org. Implements org. add an "Or" selector entry on the selector list
| |
| addPresent | back to summary |
|---|---|
| public void addPresent(PresentSelector selector) Overrides org. Implements org. add a present selector entry on the selector list
| |
| addSelector | back to summary |
|---|---|
| public void addSelector(SelectSelector selector) Overrides org. Implements org. add a "Select" selector entry on the selector list
| |
| addSize | back to summary |
|---|---|
| public void addSize(SizeSelector selector) Overrides org. Implements org. add a selector size entry on the selector list
| |
| createExclude | back to summary |
|---|---|
| public PatternSet. Overrides org. add a name entry on the exclude list
| |
| createExcludesFile | back to summary |
|---|---|
| public PatternSet. Overrides org. add a name entry on the include files list
| |
| createInclude | back to summary |
|---|---|
| public PatternSet. Overrides org. add a name entry on the include list
| |
| createIncludesFile | back to summary |
|---|---|
| public PatternSet. Overrides org. add a name entry on the include files list
| |
| createPatternSet | back to summary |
|---|---|
| public PatternSet createPatternSet() Overrides org. add a set of patterns
| |
| delete | back to summary |
|---|---|
| private boolean delete(File f) Accommodate Windows bug encountered in both Sun and IBM JDKs. Others possible. If the delete does not work, call System.gc(), wait a little and try again. | |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Delete the file(s).
| |
| handle | back to summary |
|---|---|
| private void handle(String msg) | |
| handle | back to summary |
|---|---|
| private void handle(Exception e) | |
| isDanglingSymlink | back to summary |
|---|---|
| private boolean isDanglingSymlink(final File f) | |
| removeDir | back to summary |
|---|---|
| protected void removeDir(File d) Delete a directory
| |
| removeFiles | back to summary |
|---|---|
| protected void removeFiles(File d, String[] files, String[] dirs) remove an array of files in a directory, and a list of subdirectories which will only be deleted if 'includeEmpty' is true | |
| setCaseSensitive | back to summary |
|---|---|
| public void setCaseSensitive(boolean isCaseSensitive) Overrides org. Sets case sensitivity of the file system
| |
| setDefaultexcludes | back to summary |
|---|---|
| public void setDefaultexcludes(boolean useDefaultExcludes) Overrides org. Sets whether default exclusions should be used or not.
| |
| setDeleteOnExit | back to summary |
|---|---|
| public void setDeleteOnExit(boolean deleteOnExit) If true, on failure to delete, note the error and set the deleteonexit flag, and continue
| |
| setDir | back to summary |
|---|---|
| public void setDir(File dir) Set the directory from which files are to be deleted
| |
| setExcludes | back to summary |
|---|---|
| public void setExcludes(String excludes) Overrides org. Sets the set of exclude patterns. Patterns may be separated by a comma or a space. | |
| setExcludesfile | back to summary |
|---|---|
| public void setExcludesfile(File excludesfile) Overrides org. Sets the name of the file containing the includes patterns. | |
| setFailOnError | back to summary |
|---|---|
| public void setFailOnError(boolean failonerror) If false, note errors but continue.
| |
| setFile | back to summary |
|---|---|
| public void setFile(File file) Set the name of a single file to be removed.
| |
| setFollowSymlinks | back to summary |
|---|---|
| public void setFollowSymlinks(boolean followSymlinks) Overrides org. Sets whether or not symbolic links should be followed.
| |
| setIncludeEmptyDirs | back to summary |
|---|---|
| public void setIncludeEmptyDirs(boolean includeEmpty) If true, delete empty directories.
| |
| setIncludes | back to summary |
|---|---|
| public void setIncludes(String includes) Overrides org. Sets the set of include patterns. Patterns may be separated by a comma or a space. | |
| setIncludesfile | back to summary |
|---|---|
| public void setIncludesfile(File includesfile) Overrides org. Sets the name of the file containing the includes patterns. | |
| setPerformGcOnFailedDelete | back to summary |
|---|---|
| public void setPerformGcOnFailedDelete(boolean b) Whether to perform a garbage collection before retrying a failed delete. This may be required on Windows (where it is set to true by default) but also on other operating systems, for example when deleting directories from an NFS share.
| |
| setQuiet | back to summary |
|---|---|
| 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. This setting emulates the -f option to the Unix "rm" command. Default is false meaning things are "noisy"
| |
| setRemoveNotFollowedSymlinks | back to summary |
|---|---|
| public void setRemoveNotFollowedSymlinks(boolean b) Sets whether the symbolic links that have not been followed shall be removed (the links, not the locations they point at).
| |
| setVerbose | back to summary |
|---|---|
| public void setVerbose(boolean verbose) If true, list all names of deleted files.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | isFilesystemOnly()
Implements org. |
| public Iterator | |
| public int | size()
Implements org. |
| basedir | back to summary |
|---|---|
| private File basedir | |
| dirs | back to summary |
|---|---|
| private String[] dirs | |
| project | back to summary |
|---|---|
| private Project project | |
| ReverseDirs | back to summary |
|---|---|
| pack-priv ReverseDirs(Project project, File basedir, String[] dirs) | |
| isFilesystemOnly | back to summary |
|---|---|
| public boolean isFilesystemOnly() Implements org. Doc from org. Indicate whether this ResourceCollection is composed entirely of
Resources accessible via local filesystem conventions. If true, all
resources returned from this collection should respond with a
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type | |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Learn the number of contained Resources.
| |