public class FileUtils
extends java.lang.Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(java.lang.String source_name,
java.lang.String dest_name)
Copy a file
|
static void |
copy(java.net.URL source_url,
java.lang.String dest_name)
Copy a file
|
static void |
listDir(java.lang.String directory,
java.util.Vector result)
Gets a directory listing and stores it
|
static void |
mkdir(java.lang.String directory)
Creates a new directory if needed (no exists previously)
|
static void |
mkdirs(java.lang.String directory)
Creates a new directory tree if needed (no exists previously)
|
static void |
prepareFileDirectories(java.lang.String destination,
java.lang.String entryName)
Creates the necessary directory to build a KEEL experiment
|
static void |
rmdir(java.lang.String directory)
Remove all the files in a directory, and then deletes the latter
|
static void |
UnZipFiles(java.lang.String destination,
java.lang.String filename)
Unzip a .zip file
|
static void |
ZipFiles(java.lang.String destination,
java.util.Vector files)
Compress a list of files in a .zip file
|
public static void copy(java.lang.String source_name, java.lang.String dest_name)
source_name
- the source filedest_name
- the destination filepublic static void copy(java.net.URL source_url, java.lang.String dest_name)
source_url
- url with the source filedest_name
- destination pathpublic static void listDir(java.lang.String directory, java.util.Vector result)
directory
- The path to the directoryresult
- vector in which the listing will be storedpublic static void ZipFiles(java.lang.String destination, java.util.Vector files)
destination
- the path to the destination ZIP filefiles
- list of string with the paths to the files to be compressedpublic static void prepareFileDirectories(java.lang.String destination, java.lang.String entryName)
destination
- the destination directory (non-existant)entryName
- the base-name of the directorypublic static void UnZipFiles(java.lang.String destination, java.lang.String filename)
destination
- destination of the unzziped file(s)filename
- the path to the ZIP filepublic static void mkdir(java.lang.String directory)
directory
- the new directory pathpublic static void mkdirs(java.lang.String directory)
directory
- the new directory pathpublic static void rmdir(java.lang.String directory)
directory
- the directory to be deleted (path)