arlut.csd.Util
Class FileOps
java.lang.Object
|
+--arlut.csd.Util.FileOps
- public class FileOps
- extends java.lang.Object
This utility class provides a number of static methods for doing
file operations.
|
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, registerNatives, toString, wait, wait, wait |
FileOps
public FileOps()
copyFile
public static boolean copyFile(java.lang.String inputFileName,
java.lang.String outputFileName)
throws java.io.IOException
deleteFile
public static boolean deleteFile(java.lang.String filename)
throws java.io.IOException
deleteDirectory
public static boolean deleteDirectory(java.lang.String directoryName)
throws java.io.IOException
runProcess
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.
cleanupProcess
public 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.
main
public static void main(java.lang.String[] args)
- Test rig