|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.melati.util.FileUtils
public final class FileUtils
An assortment of useful operations on Files.
| Method Summary | |
|---|---|
static void |
makeExecutable(File file)
Mark a file as executable. |
static File |
withUniqueName(File file)
Returns a File in the given directory which does
not already exist. |
static File |
writeFile(File file,
byte[] data)
Write a byte array to a given file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static File withUniqueName(File file)
directory which does
not already exist.
This file is found by starting with the given
filename. If a file of this name already exists we
put 0 then 1,2,... before the extension until we find one that
does not exists.
For instance, if newfile.txt exists then we
check newfile0.txt, newfile1.txt, ...
until we find a new filename.
public static File writeFile(File file,
byte[] data)
throws IOException
file - file to write todata - to write to file
IOException
public static void makeExecutable(File file)
throws IOException
IOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||