Groovy Documentation

org.linkedin.groovy.util.ant
[Groovy] Class AntUtils

java.lang.Object
  org.linkedin.groovy.util.ant.AntUtils

class AntUtils

Helper methods for ant

Authors:
ypujante@linkedin.com


Method Summary
static java.io.File mkdirs(java.io.File dir)

Creates the directory and parents of the provided directory.

static java.io.File tempFile()

Returns a temp file located in System.getProperty('java.io.tmpdir')

static java.io.File tempFile(java.lang.Object args)

Creates a temp file:

static java.lang.Object withBuilder(groovy.lang.Closure closure)

Executes the closure with a builder and make sure to catch BuildException to propertly unwrap them

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

mkdirs

static java.io.File mkdirs(java.io.File dir)
Creates the directory and parents of the provided directory. Returns dir.


tempFile

static java.io.File tempFile()
Returns a temp file located in System.getProperty('java.io.tmpdir')


tempFile

static java.io.File tempFile(java.lang.Object args)
Creates a temp file:
Parameters:
args.destdir - where the file should be created (optional (will go in System.getProperty('java.io.tmpdir'))
args.prefix - a prefix for the file (optional)
args.suffix - a suffix for the file (optional)
args.deleteonexit - if the temp file should be deleted on exit (default to false)
args.createParents - if the parent directories should be created (default to true)
Returns:
a file (note that it is just a file object and that the actual file has *not* been created and the parents may have been depending on the args.createParents value)


withBuilder

static java.lang.Object withBuilder(groovy.lang.Closure closure)
Executes the closure with a builder and make sure to catch BuildException to propertly unwrap them


 

Groovy Documentation