public class FileUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ArrayMaker<java.io.File> |
FILE_ARRAY_MAKER |
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
findFile(java.io.File givenFile,
java.io.File contextDir)
Tries to find the absolute file corresponding to a file.
|
static java.io.FileWriter |
makeFileWriter(java.io.File file)
Makes a FileWriter.
|
static void |
stringToFile(java.lang.String s,
java.io.File file) |
static void |
verifyForCreation(java.io.File file)
Performs some checks to establish that file can be created.
|
public static final ArrayMaker<java.io.File> FILE_ARRAY_MAKER
public static void stringToFile(java.lang.String s, java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static java.io.File findFile(java.io.File givenFile, java.io.File contextDir) throws java.io.IOException
givenFile
- The file for which we want the absolute file.contextDir
- If givenFile is relative, this is the directory towards which it is
relative.java.io.IOException
public static java.io.FileWriter makeFileWriter(java.io.File file)
file
- public static void verifyForCreation(java.io.File file)
file
- The file to be checkedjava.lang.RuntimeException
- if the checks fail.