Loop over Calendar
This is an example with a GregorianCalendar.
(more…)
Create random integers
This will create 10 random integers an put the in a list.
(more…)
HelloWorld with AntBuilder
This shows you how print “HelloWorld” with the groovy AntBuilder.
(more…)
Deleting a directory with AntBuilder
Deleting a directory with the AntBuilder is simple.
(more…)
Directory contents as Ascii tree
This shows how to print the contents of a directory as an Ascii tree. The output is similar to the ls -tree command under Unix/Linux.
(more…)
Create a directory with AntBuilder
This creates a directory with the groovy AntBuilder.
(more…)
Create a zipfile
Creating a zipfile in groovy is pretty simple.
(more…)
Get drive letters
To Retrieve all the topmost directories you can use the following code snippet.
(more…)
Working directory
Getting the working directory of a script is simple.
(more…)
Filter lines
The filterLine returns those lines where the closure returns true.
(more…)