|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.linkedin.util.io.IOUtils
org.linkedin.groovy.util.io.GroovyIOUtils
class GroovyIOUtils extends IOUtils
IO related utilities
Method Summary | |
---|---|
static Resource
|
eachChildRecurse(Resource resource, groovy.lang.Closure closure)
The closure will be called for every child (recursively) of the provided resource |
static void
|
eachLine(java.io.Reader reader, groovy.lang.Closure closure)
The difference between |
static void
|
eachLine(java.net.URL url, groovy.lang.Closure closure)
Convenient call which calls {@link #eachLine(Reader, Closure). |
static java.lang.Object
|
findAll(Resource resource, groovy.lang.Closure closure)
Every child resource of this resource (recursively) is being passed to the closure. |
static boolean
|
isChild(java.io.File parent, java.io.File child)
|
static java.io.File
|
makeRelativeToParent(java.io.File parent, java.io.File child)
Ex: parent=/a/b/c child='/a/b/c/d/e'... would return d/e |
static java.io.File
|
mkdirs(java.io.File dir)
Creates the directory and parents of the provided directory. |
static java.io.File
|
toFile(java.lang.Object s)
returns a file... handles |
Method Detail |
---|
static Resource eachChildRecurse(Resource resource, groovy.lang.Closure closure)
static void eachLine(java.io.Reader reader, groovy.lang.Closure closure)
reader.eachLine()
and this method is that
as soon as the closure returns false
then the iteration is stopped. There is no
way to stop the iteration with reader.eachLine()
.
static void eachLine(java.net.URL url, groovy.lang.Closure closure)
static java.lang.Object findAll(Resource resource, groovy.lang.Closure closure)
true
then it will be part of the result.
static boolean isChild(java.io.File parent, java.io.File child)
true
if child is really a child of parent or in other words if child
is located in a subpath of parent (handle canonical path properly)
static java.io.File makeRelativeToParent(java.io.File parent, java.io.File child)
null
if child is not a child of parent! If child is relative the return child
static java.io.File mkdirs(java.io.File dir)
static java.io.File toFile(java.lang.Object s)
File
, URI, URL, string, null
Groovy Documentation