cassis.gui.util
public class FileUtils extends java.lang.Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(java.io.File src,
java.io.File dst)
Copy the file to dst file.
|
static java.io.File |
download(java.lang.String stringUrl,
boolean isTemp)
Download a file with the given url.
|
static java.io.File |
downloadAndRenameIfNeeded(java.lang.String stringUrl,
boolean isTemp)
Download a file with the given url and rename it if necessary (needed for vospecflow for exemple).
|
static java.lang.String |
getFileExtension(java.lang.String nomFichier) |
static boolean |
move(java.io.File baseFile,
java.io.File newFile)
Try to move/rename a file.
|
static void |
recursiveDelete(java.io.File path)
TODO force argument true not supported !
Delete recursivly the specified directory and its content. Warning : this method doesn't check if path is null. |
public static void copy(java.io.File src,
java.io.File dst)
throws java.io.IOException
src - The file copydst - The new filejava.io.IOExceptionpublic static void recursiveDelete(java.io.File path)
throws java.io.IOException,
java.io.FileNotFoundException
path - the directory to deletejava.io.IOException - if one of the file can't be deleted or an IOException occurs.java.io.FileNotFoundException - if path not existspublic static java.lang.String getFileExtension(java.lang.String nomFichier)
public static java.io.File downloadAndRenameIfNeeded(java.lang.String stringUrl,
boolean isTemp)
stringUrl - The url of the file.isTemp - If the file should be removed when exiting the application.public static boolean move(java.io.File baseFile,
java.io.File newFile)
baseFile - The file to move.newFile - The new file.public static java.io.File download(java.lang.String stringUrl,
boolean isTemp)
stringUrl - The url of the file.isTemp - If the file should be removed when exiting the application.