public class Util
extends java.lang.Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.io.File> |
findFiles(java.util.List<java.io.File> ret,
java.io.File dir,
java.lang.String... extensions)
Returns all files and directories underneath the specified
dir,
recursively. |
static java.lang.String |
readResource(java.lang.String name)
Reads a resource into a string.
|
static void |
writeFile(java.lang.String contents,
java.io.File f)
Writes a string to a file.
|
public static java.util.List<java.io.File> findFiles(java.util.List<java.io.File> ret,
java.io.File dir,
java.lang.String... extensions)
dir,
recursively. Files can be filtered by extensions.ret - results will be added to this listdir - the directory to search (recursively)extensions - only include files with these extensionspublic static void writeFile(java.lang.String contents,
java.io.File f)
contents - the string to writef - the file to writejava.lang.RuntimeException - if something goes wrongpublic static java.lang.String readResource(java.lang.String name)
name - the resource's namejava.lang.RuntimeException - if something goes wrong