public class FileUtils
extends java.lang.Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.io.File src,
java.io.File destination) |
static java.io.File |
resolvePath(java.io.File base,
java.lang.String path)
Resolves a path relative a base directory.
|
static void |
sync(java.io.File fullFile)
Copied from Lucene's FSDirectory.fsync(String)
|
public static java.io.File resolvePath(java.io.File base, java.lang.String path)
This method does what "new File(base,path)" Should do, it wasn't completely lame: If path is absolute, then a File for that path is returned; if it's not absoluve, then a File is returnd using "path" as a child of "base")
public static void copyFile(java.io.File src, java.io.File destination) throws java.io.IOException
java.io.IOException
public static void sync(java.io.File fullFile) throws java.io.IOException
fullFile
- the File to be synced to diskjava.io.IOException
- if the file could not be synced