|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--arlut.csd.Util.FileOps
This utility class provides a number of static methods for doing file operations.
| Constructor Summary | |
FileOps()
|
|
| Method Summary | |
static void |
cleanupProcess(java.lang.Process p)
This method shuts down / cleans up all resources related to Process p. |
static boolean |
copyFile(java.lang.String inputFileName,
java.lang.String outputFileName)
|
static boolean |
deleteDirectory(java.lang.String directoryName)
|
static boolean |
deleteFile(java.lang.String filename)
|
static void |
main(java.lang.String[] args)
Test rig |
static int |
runProcess(java.lang.String commandLine)
This method is used to run an external process line for the Ganymede server. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileOps()
| Method Detail |
public static boolean copyFile(java.lang.String inputFileName,
java.lang.String outputFileName)
throws java.io.IOException
java.io.IOException
public static boolean deleteFile(java.lang.String filename)
throws java.io.IOException
java.io.IOException
public static boolean deleteDirectory(java.lang.String directoryName)
throws java.io.IOException
java.io.IOException
public static int runProcess(java.lang.String commandLine)
throws java.io.IOException,
java.lang.InterruptedException
This method is used to run an external process line for the Ganymede server. This method waits until the external command completes before returning, and all file handles opened to communicate with the process will be closed before returning.
java.io.IOException
java.lang.InterruptedExceptionpublic static void cleanupProcess(java.lang.Process p)
This method shuts down / cleans up all resources related to Process p. The following is mentioned as a work-around for the fact that Process keeps its file descriptors open by default until Garbage Collection.
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||