Filename filter

This shows the usage of the Java FilenameFilter with groovy.
(more…)

List directory contents

This lists all files in a directory.
(more…)

Get all files of a specific type

This snippet shows howto get all *.txt files under the “test” directory.
(more…)

List files recursively

This shows how to list all files and directories under the current directory.
(more…)

List all subdirectories

Howto list all subdirectories under the current directory.
(more…)

List directories recursively

The following groovy snippet lists all subdirectories of the current directory.
(more…)

List all directories with a specific name

This groovy snippet lists all directories named “bar” in the “test” directory.
(more…)

Listing a directory the Java way

List the contents of a directory with groovy using the built in methods of Java. The groovy way is described in the following snippetsList files of a specific type, List directory contents and list files recursively.
(more…)

List directory contents with AntBuilder

This shows how to list the content of a directory with AntBuilder.
(more…)

Deleting a directory with AntBuilder

Deleting a directory with the AntBuilder is simple.
(more…)