Command line interface with CommandLine Builder

Simple example of the groovy commandline builder.

(more…)

Execute external programs

This example executes an external program as an process in groovy.
(more…)

Read from stdin

Read lines from stdin and print in on stdout. Terminate the program when “exit” is entered.
(more…)

Read the first line of a file

Snippet to read the first line of a file in Groovy.
(more…)

Filename filter

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

List filesystem roots

This shows how to use the function in 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…)