How can one test to see that a directory is empty in ant?
相关问题
- How to access the camera from my Windows Phone 8 a
- How can I have my ant task pass or fail based on t
- C++ Find execution path on Mac
- Folder monitoring and event triggering according t
- Ant inheriting Maven properties
相关文章
- Passing command line arguments to Java via ant bui
- Directory.CreateDirectory Latency Issue?
- ANT - Could not load a dependent class com/jcraft/
- How can i list only the folders in zip archive in
- Python Imports From The Directory Above
- library resolve to a path with no project.properti
- ant file that depends on another ant file
- android-sdk/tools/ant/build.xml:698: null returned
scripted solution that sets a property only when the directory is empty:
This is just a complement for tonio's answer.
In this example
cvs checkout
is emulated usinggit
commands:git clone
whendir
is emptygit fetch
elseYou can use the
pathconvert
task to do that, with thesetonempty
property. See this example for an use case.will set the property
fileset.notempty
only if the fileset those refid ismyfileset
is not empty.You just have to define
myfileset
with your directory, and no excludes do get a directory empty test: