diff --git a/docs/index.html b/docs/index.html index 2f437bc82..36d6cf078 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1059,6 +1059,14 @@ elements.

chmod command. Defaults to true. No + + type + One of file, dir or + both. If set to file, only the permissions of + plain files are going to be changed. If set to dir, only + the directories are considered. + No, default is file +

Examples

@@ -1548,10 +1556,10 @@ system command.

Executes a system command. When the os attribute is specified, then the command is only executed when Ant is run on one of the specified operating systems.

-

The files of a number of FileSets are passed -as arguments to the system command. At least one nested -<fileset> or <filesetref> is -required.

+

The files and/or directories of a number of FileSets are passed as arguments to the system +command. At least one nested <fileset> or +<filesetref> is required.

Parameters

@@ -1601,6 +1609,14 @@ required.

once for every file. + + + + +
No
typeOne of file, dir or + both. If set to file, only the names of plain + files will be sent to the command. If set to dir, only + the names of directories are considered.No, default is file

Parameters specified as nested elements

fileset and filesetref

diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java b/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java index b96b520db..baca677be 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java +++ b/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java @@ -71,6 +71,7 @@ public class ExecuteOn extends ExecTask { protected Vector filesets = new Vector(); private boolean parallel = false; + protected String type = "file"; /** * Adds a set of files (nested fileset attribute). @@ -93,6 +94,13 @@ public class ExecuteOn extends ExecTask { this.parallel = parallel; } + /** + * Shall the command work only on files, directories or both? + */ + public void setType(FileDirBoth type) { + this.type = type.getValue(); + } + protected void checkConfiguration() { super.checkConfiguration(); if (filesets.size() == 0) { @@ -122,9 +130,18 @@ public class ExecuteOn extends ExecTask { } DirectoryScanner ds = fs.getDirectoryScanner(project); - String[] s = ds.getIncludedFiles(); - for (int j=0; j