|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.resources.util.FileUtils
public class FileUtils
Utilities for working with Files.
| Constructor Summary | |
|---|---|
FileUtils()
|
|
| Method Summary | |
|---|---|
static void |
checkDirectory(File dir,
String description)
Check that a directory exists, is a directory and can be written to |
static void |
copy(File src,
File dst)
Copies one file to another |
static String |
getFilePath(File f)
Get the path from a File object |
static String |
makeFileName(String root,
String extension)
Make a directory or file name |
static void |
remove(File file)
Remove a File |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtils()
| Method Detail |
|---|
public static String getFilePath(File f)
f - The file
public static String makeFileName(String root,
String extension)
root - The root directory nameextension - The name of the extension
public static void remove(File file)
file - A File object to remove
public static void checkDirectory(File dir,
String description)
throws IOException
dir - The directory to check. If the directory does not exist,
create itdescription - A description of the directory, used for filling in
details for IOException that may be thrown
IOException - If the provided dir is not a directory, or if the
directory cannt be written to
IllegalArgumentException - if the dir parameter is null
public static void copy(File src,
File dst)
throws IOException
src - The source filedst - The destination File. If the dst file does not exist, it is created
IOException - If the copy fails
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||