Java Doc for Delete.java in  » Build » ANT » org » apache » tools » ant » taskdefs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.taskdefs.MatchingTask
   org.apache.tools.ant.taskdefs.Delete

Delete
public class Delete extends MatchingTask (Code)
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.


since:
   Ant 1.2


Field Summary
protected  Filedir
    
protected  Filefile
    
protected  Vectorfilesets
    
protected  booleanincludeEmpty
    
protected  booleanusedMatchingTask
    


Method Summary
public  voidadd(ResourceCollection rc)
     Add an arbitrary ResourceCollection to be deleted.
public  voidadd(FileSelector selector)
    
public  voidaddAnd(AndSelector selector)
    
public  voidaddContains(ContainsSelector selector)
    
public  voidaddContainsRegexp(ContainsRegexpSelector selector)
    
public  voidaddCustom(ExtendSelector selector)
    
public  voidaddDate(DateSelector selector)
    
public  voidaddDepend(DependSelector selector)
    
public  voidaddDepth(DepthSelector selector)
    
public  voidaddFilename(FilenameSelector selector)
    
public  voidaddFileset(FileSet set)
     Adds a set of files to be deleted.
public  voidaddMajority(MajoritySelector selector)
    
public  voidaddModified(ModifiedSelector selector)
    
public  voidaddNone(NoneSelector selector)
    
public  voidaddNot(NotSelector selector)
    
public  voidaddOr(OrSelector selector)
    
public  voidaddPresent(PresentSelector selector)
    
public  voidaddSelector(SelectSelector selector)
    
public  voidaddSize(SizeSelector selector)
    
public  PatternSet.NameEntrycreateExclude()
    
public  PatternSet.NameEntrycreateExcludesFile()
    
public  PatternSet.NameEntrycreateInclude()
    
public  PatternSet.NameEntrycreateIncludesFile()
    
public  PatternSetcreatePatternSet()
    
public  voidexecute()
     Delete the file(s).
protected  voidremoveDir(File d)
    
protected  voidremoveFiles(File d, String[] files, String[] dirs)
    
public  voidsetCaseSensitive(boolean isCaseSensitive)
    
public  voidsetDefaultexcludes(boolean useDefaultExcludes)
     Sets whether default exclusions should be used or not.
public  voidsetDeleteOnExit(boolean deleteOnExit)
    
public  voidsetDir(File dir)
    
public  voidsetExcludes(String excludes)
     Sets the set of exclude patterns.
public  voidsetExcludesfile(File excludesfile)
     Sets the name of the file containing the includes patterns.
public  voidsetFailOnError(boolean failonerror)
     If false, note errors but continue.
public  voidsetFile(File file)
     Set the name of a single file to be removed.
public  voidsetFollowSymlinks(boolean followSymlinks)
     Sets whether or not symbolic links should be followed.
public  voidsetIncludeEmptyDirs(boolean includeEmpty)
     If true, delete empty directories.
Parameters:
  includeEmpty - if true delete empty directories (onlyfor filesets).
public  voidsetIncludes(String includes)
     Sets the set of include patterns.
public  voidsetIncludesfile(File includesfile)
     Sets the name of the file containing the includes patterns.
public  voidsetQuiet(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  voidsetVerbose(boolean verbose)
     If true, list all names of deleted files.

Field Detail
dir
protected File dir(Code)



file
protected File file(Code)



filesets
protected Vector filesets(Code)



includeEmpty
protected boolean includeEmpty(Code)



usedMatchingTask
protected boolean usedMatchingTask(Code)





Method Detail
add
public void add(ResourceCollection rc)(Code)
Add an arbitrary ResourceCollection to be deleted.
Parameters:
  rc - the filesystem-only ResourceCollection.



add
public void add(FileSelector selector)(Code)
add an arbitrary selector
Parameters:
  selector - the selector to be added
since:
   Ant 1.6



addAnd
public void addAnd(AndSelector selector)(Code)
add an "And" selector entry on the selector list
Parameters:
  selector - the selector to be added



addContains
public void addContains(ContainsSelector selector)(Code)
add a contains selector entry on the selector list
Parameters:
  selector - the selector to be added



addContainsRegexp
public void addContainsRegexp(ContainsRegexpSelector selector)(Code)
add a regular expression selector entry on the selector list
Parameters:
  selector - the selector to be added



addCustom
public void addCustom(ExtendSelector selector)(Code)
add an extended selector entry on the selector list
Parameters:
  selector - the selector to be added



addDate
public void addDate(DateSelector selector)(Code)
add a selector date entry on the selector list
Parameters:
  selector - the selector to be added



addDepend
public void addDepend(DependSelector selector)(Code)
add a depends selector entry on the selector list
Parameters:
  selector - the selector to be added



addDepth
public void addDepth(DepthSelector selector)(Code)
add a depth selector entry on the selector list
Parameters:
  selector - the selector to be added



addFilename
public void addFilename(FilenameSelector selector)(Code)
add a selector filename entry on the selector list
Parameters:
  selector - the selector to be added



addFileset
public void addFileset(FileSet set)(Code)
Adds a set of files to be deleted.
Parameters:
  set - the set of files to be deleted



addMajority
public void addMajority(MajoritySelector selector)(Code)
add a majority selector entry on the selector list
Parameters:
  selector - the selector to be added



addModified
public void addModified(ModifiedSelector selector)(Code)
add the modified selector
Parameters:
  selector - the selector to add
since:
   ant 1.6



addNone
public void addNone(NoneSelector selector)(Code)
add a "None" selector entry on the selector list
Parameters:
  selector - the selector to be added



addNot
public void addNot(NotSelector selector)(Code)
add a "Not" selector entry on the selector list
Parameters:
  selector - the selector to be added



addOr
public void addOr(OrSelector selector)(Code)
add an "Or" selector entry on the selector list
Parameters:
  selector - the selector to be added



addPresent
public void addPresent(PresentSelector selector)(Code)
add a present selector entry on the selector list
Parameters:
  selector - the selector to be added



addSelector
public void addSelector(SelectSelector selector)(Code)
add a "Select" selector entry on the selector list
Parameters:
  selector - the selector to be added



addSize
public void addSize(SizeSelector selector)(Code)
add a selector size entry on the selector list
Parameters:
  selector - the selector to be added



createExclude
public PatternSet.NameEntry createExclude()(Code)
add a name entry on the exclude list an NameEntry object to be configured



createExcludesFile
public PatternSet.NameEntry createExcludesFile()(Code)
add a name entry on the include files list an NameEntry object to be configured



createInclude
public PatternSet.NameEntry createInclude()(Code)
add a name entry on the include list a NameEntry object to be configured



createIncludesFile
public PatternSet.NameEntry createIncludesFile()(Code)
add a name entry on the include files list an NameEntry object to be configured



createPatternSet
public PatternSet createPatternSet()(Code)
add a set of patterns PatternSet object to be configured



execute
public void execute() throws BuildException(Code)
Delete the file(s).
exception:
  BuildException - if an error occurs



removeDir
protected void removeDir(File d)(Code)
Delete a directory
Parameters:
  d - the directory to delete



removeFiles
protected void removeFiles(File d, String[] files, String[] dirs)(Code)
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



setDir
public void setDir(File dir)(Code)
Set the directory from which files are to be deleted
Parameters:
  dir - the directory path.



setExcludes
public void setExcludes(String excludes)(Code)
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



setFile
public void setFile(File file)(Code)
Set the name of a single file to be removed.
Parameters:
  file - the file to be deleted



setFollowSymlinks
public void setFollowSymlinks(boolean followSymlinks)(Code)
Sets whether or not symbolic links should be followed.
Parameters:
  followSymlinks - whether or not symbolic links should be followed



setIncludeEmptyDirs
public void setIncludeEmptyDirs(boolean includeEmpty)(Code)
If true, delete empty directories.
Parameters:
  includeEmpty - if true delete empty directories (onlyfor filesets). Default is false.



setIncludes
public void setIncludes(String includes)(Code)
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.



setQuiet
public void setQuiet(boolean quiet)(Code)
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"



setVerbose
public void setVerbose(boolean verbose)(Code)
If true, list all names of deleted files.
Parameters:
  verbose - "true" or "on"



Fields inherited from org.apache.tools.ant.taskdefs.MatchingTask
protected FileSet fileset(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.MatchingTask
public void XsetIgnore(String ignoreString)(Code)(Java Doc)
public void XsetItems(String itemString)(Code)(Java Doc)
public void add(FileSelector selector)(Code)(Java Doc)
public void addAnd(AndSelector selector)(Code)(Java Doc)
public void addContains(ContainsSelector selector)(Code)(Java Doc)
public void addContainsRegexp(ContainsRegexpSelector selector)(Code)(Java Doc)
public void addCustom(ExtendSelector selector)(Code)(Java Doc)
public void addDate(DateSelector selector)(Code)(Java Doc)
public void addDepend(DependSelector selector)(Code)(Java Doc)
public void addDepth(DepthSelector selector)(Code)(Java Doc)
public void addDifferent(DifferentSelector selector)(Code)(Java Doc)
public void addFilename(FilenameSelector selector)(Code)(Java Doc)
public void addMajority(MajoritySelector selector)(Code)(Java Doc)
public void addModified(ModifiedSelector selector)(Code)(Java Doc)
public void addNone(NoneSelector selector)(Code)(Java Doc)
public void addNot(NotSelector selector)(Code)(Java Doc)
public void addOr(OrSelector selector)(Code)(Java Doc)
public void addPresent(PresentSelector selector)(Code)(Java Doc)
public void addSelector(SelectSelector selector)(Code)(Java Doc)
public void addSize(SizeSelector selector)(Code)(Java Doc)
public void addType(TypeSelector selector)(Code)(Java Doc)
public void appendSelector(FileSelector selector)(Code)(Java Doc)
public PatternSet.NameEntry createExclude()(Code)(Java Doc)
public PatternSet.NameEntry createExcludesFile()(Code)(Java Doc)
public PatternSet.NameEntry createInclude()(Code)(Java Doc)
public PatternSet.NameEntry createIncludesFile()(Code)(Java Doc)
public PatternSet createPatternSet()(Code)(Java Doc)
protected DirectoryScanner getDirectoryScanner(File baseDir)(Code)(Java Doc)
final protected FileSet getImplicitFileSet()(Code)(Java Doc)
public FileSelector[] getSelectors(Project p)(Code)(Java Doc)
public boolean hasSelectors()(Code)(Java Doc)
public int selectorCount()(Code)(Java Doc)
public Enumeration selectorElements()(Code)(Java Doc)
public void setCaseSensitive(boolean isCaseSensitive)(Code)(Java Doc)
public void setDefaultexcludes(boolean useDefaultExcludes)(Code)(Java Doc)
public void setExcludes(String excludes)(Code)(Java Doc)
public void setExcludesfile(File excludesfile)(Code)(Java Doc)
public void setFollowSymlinks(boolean followSymlinks)(Code)(Java Doc)
public void setIncludes(String includes)(Code)(Java Doc)
public void setIncludesfile(File includesfile)(Code)(Java Doc)
public void setProject(Project project)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.