public class FileUtils
extends java.lang.Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkFile(java.io.File file,
java.lang.String name) |
static void |
close(java.io.Closeable... closeable)
Silently close given files.
|
static java.io.File[] |
contentsOf(java.io.File folder,
java.lang.String name) |
static void |
copyStream(java.io.InputStream is,
java.io.OutputStream os,
int buffer_size) |
static boolean |
delete(java.io.File file) |
static java.io.File |
getFile(java.lang.String fname) |
static java.net.URI |
getURI(java.lang.String path) |
static java.lang.String |
keyToFileName(Key k)
Transform given key to a string which can be used as a file name.
|
static java.io.File |
locateFile(java.lang.String fname)
Hunt for files in likely places.
|
public static void close(java.io.Closeable... closeable)
closeable
- files to closepublic static void copyStream(java.io.InputStream is, java.io.OutputStream os, int buffer_size)
public static java.net.URI getURI(java.lang.String path)
public static boolean delete(java.io.File file)
public static java.io.File locateFile(java.lang.String fname)
fname
- filenamepublic static void checkFile(java.io.File file, java.lang.String name) throws java.io.IOException
java.io.IOException
public static java.io.File getFile(java.lang.String fname) throws java.io.IOException
java.io.IOException
public static java.io.File[] contentsOf(java.io.File folder, java.lang.String name) throws java.io.IOException
java.io.IOException
public static java.lang.String keyToFileName(Key k)