|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.io.FileSystem
public final class FileSystem
Provides various filesystem operations common to scripting languages such as Perl and Python but not present (currently) in the Java standard libraries.
Method Summary | |
---|---|
static void |
copyFile(java.io.File sourceFile,
java.io.File destFile)
Copies a file. |
static boolean |
deleteDir(java.io.File dir)
Recursively deletes a directory, including all files and sub-directories. |
static boolean |
existsAndNonEmpty(java.io.File file)
Returns whether a file object both exists and has contents (i.e. |
static void |
gzipFile(java.io.File uncompressedFileName,
java.io.File compressedFileName)
Similar to the unix gzip command, only it does not delete the file after compressing it. |
static void |
main(java.lang.String[] args)
Unit test code |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void copyFile(java.io.File sourceFile, java.io.File destFile) throws java.io.IOException
sourceFile
- The file to copy.destFile
- The path to copy to which the file should be copied.
java.io.IOException
public static void gzipFile(java.io.File uncompressedFileName, java.io.File compressedFileName) throws java.io.IOException
uncompressedFileName
- The file to gzipcompressedFileName
- The file name for the compressed file
java.io.IOException
public static boolean deleteDir(java.io.File dir)
dir
- The directory to delete
public static boolean existsAndNonEmpty(java.io.File file)
file
-
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |