| java.lang.Object org.hsqldb.lib.FileUtil
FileUtil | public class FileUtil implements FileAccess(Code) | | A collection of static file management methods.
Also implements the default FileAccess method
author: fredt@users author: boucherb@users author: Ocke Janssen oj@openoffice.org version: 1.8.0 since: 1.7.2 |
Method Summary | |
public static String | absolutePath(String path) Retrieves the absolute path, given some path specification. | public static File | canonicalFile(File f) Retrieves the canonical file for the given file, in a
JDK 1.1 complaint way. | public static File | canonicalFile(String path) Retrieves the canonical file for the given path, in a
JDK 1.1 complaint way. | public static String | canonicalOrAbsolutePath(String path) Retrieves the canonical path for the given path, or the absolute
path if attemting to retrieve the canonical path fails. | public static String | canonicalPath(File f) Retrieves the canonical path for the given File, in a
JDK 1.1 complaint way. | public static String | canonicalPath(String path) Retrieves the canonical path for the given path, in a
JDK 1.1 complaint way. | public void | createParentDirs(java.lang.String filename) | public static void | delete(String filename) | public static void | deleteOnExit(File f) Requests, in a JDK 1.1 compliant way, that the file or directory denoted
by the given abstract pathname be deleted when the virtual machine
terminates. | public static boolean | exists(String filename) Return true or false based on whether the named file exists. | public static boolean | exists(String fileName, boolean resource, Class cla) | public static FileUtil | getDefaultInstance() | public FileAccess.FileSync | getFileSync(java.io.OutputStream os) | public boolean | isStreamElement(java.lang.String elementName) | public static void | makeParentDirectories(File f) | public java.io.InputStream | openInputStreamElement(java.lang.String streamName) | public java.io.OutputStream | openOutputStreamElement(java.lang.String streamName) | public void | removeElement(java.lang.String filename) | public void | renameElement(java.lang.String oldName, java.lang.String newName) | public static void | renameOverwrite(String oldname, String newname) Rename the file with oldname to newname. | public static IOException | toIOException(Throwable e) |
fsIsIgnoreCase | final public static boolean fsIsIgnoreCase(Code) | | |
fsNormalizesPosixSeparator | final public static boolean fsNormalizesPosixSeparator(Code) | | |
FileUtil | FileUtil()(Code) | | Creates a new instance of FileUtil
|
absolutePath | public static String absolutePath(String path)(Code) | | Retrieves the absolute path, given some path specification.
Parameters: path - the path for which to retrieve the absolute path the absolute path |
canonicalFile | public static File canonicalFile(File f) throws IOException(Code) | | Retrieves the canonical file for the given file, in a
JDK 1.1 complaint way.
Parameters: f - the File for which to retrieve the absolute File the canonical File |
canonicalFile | public static File canonicalFile(String path) throws IOException(Code) | | Retrieves the canonical file for the given path, in a
JDK 1.1 complaint way.
Parameters: path - the path for which to retrieve the canonical File the canonical File |
canonicalOrAbsolutePath | public static String canonicalOrAbsolutePath(String path)(Code) | | Retrieves the canonical path for the given path, or the absolute
path if attemting to retrieve the canonical path fails.
Parameters: path - the path for which to retrieve the canonical orabsolute path the canonical or absolute path |
canonicalPath | public static String canonicalPath(File f) throws IOException(Code) | | Retrieves the canonical path for the given File, in a
JDK 1.1 complaint way.
Parameters: f - the File for which to retrieve the canonical path the canonical path |
canonicalPath | public static String canonicalPath(String path) throws IOException(Code) | | Retrieves the canonical path for the given path, in a
JDK 1.1 complaint way.
Parameters: path - the path for which to retrieve the canonical path the canonical path |
delete | public static void delete(String filename)(Code) | | Delete the named file
|
deleteOnExit | public static void deleteOnExit(File f)(Code) | | Requests, in a JDK 1.1 compliant way, that the file or directory denoted
by the given abstract pathname be deleted when the virtual machine
terminates.
Deletion will be attempted only for JDK 1.2 and greater runtime
environments and only upon normal termination of the virtual
machine, as defined by the Java Language Specification.
Once deletion has been sucessfully requested, it is not possible to
cancel the request. This method should therefore be used with care.
Parameters: f - the abstract pathname of the file be deleted when the virtualmachine terminates |
exists | public static boolean exists(String filename)(Code) | | Return true or false based on whether the named file exists.
|
exists | public static boolean exists(String fileName, boolean resource, Class cla)(Code) | | |
makeParentDirectories | public static void makeParentDirectories(File f)(Code) | | |
renameOverwrite | public static void renameOverwrite(String oldname, String newname)(Code) | | Rename the file with oldname to newname. If a file with newname already
exists, it is deleted before the renaming operation proceeds.
If a file with oldname does not exist, no file will exist after the
operation.
|
|
|