com.sun.jini.system
Class FileSystem
java.lang.Object
com.sun.jini.system.FileSystem
public class FileSystem
- extends Object
Miscellaneous file system manipulation methods.
- Author:
- Sun Microsystems, Inc.
Method Summary |
static void |
destroy(File file,
boolean proceed)
Remove this completely. |
static void |
ensureDir(String path)
Ensure that the given path is a directory, creating it if
necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSystem
public FileSystem()
destroy
public static void destroy(File file,
boolean proceed)
throws IOException
- Remove this completely. If the parameter is a directory, it is
removed after recursively destroying all its contents, including
subdirectories. If the named file does not exist,
destroy
simply returns.
- Parameters:
proceed
- Proceed in the face of errors; otherwise the first error stops
the execution of the method.
- Throws:
IOException
- The list of files that couldn't be removed (in the detail string).
ensureDir
public static void ensureDir(String path)
throws IllegalArgumentException
- Ensure that the given path is a directory, creating it if
necessary. If the path exists it must be a directory.
It the path does not exist this method uses
File.mkdirs
to create the directory along with any
intermediate paths.
- Throws:
IllegalArgumentException
- if the path already exists but is not a
directory, or it does not exist and cannot be created.
Copyright © GigaSpaces.