|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jwarp.util.io.FileUtil
This class provides some facilities for manipulating files.
| Method Summary | |
static java.lang.String |
catPath(java.lang.String firstPath,
java.lang.String secondPath)
This will concatenate 2 paths, dealing with .. ( |
static void |
cleanDirectory(java.io.File directory)
Clean a directory without deleting it. |
static void |
cleanDirectory(java.lang.String directory)
Clean a directory without deleting it. |
static void |
copyFile(java.io.File source,
java.io.File destination)
Copy a file from source to destination. |
static void |
copyFileToDirectory(java.io.File source,
java.io.File destinationDirectory)
Copy a file from source to destination. |
static void |
copyFileToDirectory(java.lang.String source,
java.lang.String destinationDirectory)
Copy a file from source to destination. |
static void |
copyURLToFile(java.net.URL source,
java.io.File destination)
Extract a url's content and write it to a file. |
static void |
deleteDirectory(java.io.File directory)
Recursively delete a directory. |
static void |
deleteDirectory(java.lang.String directory)
Recursively delete a directory. |
static void |
forceDelete(java.io.File file)
Delete a file. |
static void |
forceDelete(java.lang.String file)
Delete a file. |
static java.lang.String |
removeExtention(java.lang.String filename)
Remove the file extension from a file path. |
static java.lang.String |
removePath(java.lang.String filepath)
Removes the directory path thus returning the file name only. |
static java.io.File |
resolveFile(java.io.File baseFile,
java.lang.String filename)
Resolve a file. |
| Methods inherited from class java.lang.Object |
|
| Method Detail |
public static java.lang.String removeExtention(java.lang.String filename)
filename - The source file namereturn - The filename without any extensionpublic static java.lang.String removePath(java.lang.String filepath)
filepath - The whole file path
public static void copyFileToDirectory(java.lang.String source,
java.lang.String destinationDirectory)
throws java.io.IOException
source - The source filedestinationDirectory - The destination directoryjava.io.IOException - If something went wrong
public static void copyFileToDirectory(java.io.File source,
java.io.File destinationDirectory)
throws java.io.IOException
source - The source filedestinationDirectory - The destination directoryjava.io.IOException - If something went wrong
public static void copyFile(java.io.File source,
java.io.File destination)
throws java.io.IOException
source - The source filedestination - The destination filejava.io.IOException - If something went wrong
public static void copyURLToFile(java.net.URL source,
java.io.File destination)
throws java.io.IOException
source - The urldestination - The destination filejava.io.IOException - If something went wrong
public static java.lang.String catPath(java.lang.String firstPath,
java.lang.String secondPath)
firstPath - The first pathsecondPath - The decondPath
public static java.io.File resolveFile(java.io.File baseFile,
java.lang.String filename)
baseFile - The base filefilename - The filename
public static void forceDelete(java.lang.String file)
throws java.io.IOException
file - The file or directoryjava.io.IOException - If something went wrong
public static void forceDelete(java.io.File file)
throws java.io.IOException
file - The file or directoryjava.io.IOException - If something went wrong
public static void deleteDirectory(java.lang.String directory)
throws java.io.IOException
directory - The directoryjava.io.IOException - If something went wrong
public static void deleteDirectory(java.io.File directory)
throws java.io.IOException
directory - The directoryjava.io.IOException - If something went wrong
public static void cleanDirectory(java.lang.String directory)
throws java.io.IOException
directory - The directoryjava.io.IOException - If something went wrong
public static void cleanDirectory(java.io.File directory)
throws java.io.IOException
directory - The directoryjava.io.IOException - If something went wrong
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||