|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.scape_project.xa.tw.util.FileUtil
public final class FileUtil
These are generic file utilities used by the client and service.
Field Summary | |
---|---|
static String |
JAVA_TMP
The Java property for the system temp directory |
Method Summary | |
---|---|
static void |
close(Closeable out)
|
static boolean |
deleteTempFiles(File workFolder)
This method deletes all the content in a folder, without the need of passing it a PlanetsLogger instance! |
static File |
getSystemTempFolder()
Get system's JAVA temporary directory. |
static File |
getTmpFile(byte[] data,
String name,
String suffix)
Get temporary file |
static File |
getTmpFile(String name,
String suffix)
Get temporary file |
static String |
makePath(String... parts)
|
static boolean |
mkdir(File file)
|
static boolean |
mkdirs(File file)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JAVA_TMP
Method Detail |
---|
public static File getSystemTempFolder()
public static File getTmpFile(String name, String suffix)
name
- The name to use when generating the temp filesuffix
- The suffix for the temp file to be created
public static File getTmpFile(byte[] data, String name, String suffix)
data
- - the data to write to that filename
- - the file name of the file to be createdsuffix
- - the suffx of that file (e.g. ".tmp", ".bin", ...)
public static boolean deleteTempFiles(File workFolder)
workFolder
- the folder you wish to delete. All contained folders
will be deleted recursively
public static void close(Closeable out)
out
- The closeable (Writer, Stream, etc.) to closepublic static boolean mkdir(File file)
file
- The file to call mkdir on and check for the result
IllegalArgumentException
- if the creation was not successful and
the file does not already existpublic static boolean mkdirs(File file)
file
- The file to call mkdirs on and check for the result
IllegalArgumentException
- if the creation was not successful and
the file does not already existpublic static String makePath(String... parts)
parts
- String args to be assembled into a path.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |