|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.store.fs.FilePath
org.h2.store.fs.FilePathWrapper
org.h2.test.utils.FilePathDebug
public class FilePathDebug
A debugging file system that logs all operations.
| Field Summary |
|---|
| Fields inherited from class org.h2.store.fs.FilePath |
|---|
name |
| Constructor Summary | |
|---|---|
FilePathDebug()
|
|
| Method Summary | |
|---|---|
boolean |
canWrite()
Check if the file is writable. |
void |
createDirectory()
Create a directory (all required parent directories already exist). |
boolean |
createFile()
Create a new file. |
FilePath |
createTempFile(java.lang.String suffix,
boolean deleteOnExit,
boolean inTempDir)
Create a new temporary file. |
void |
delete()
Delete a file or directory if it exists. |
boolean |
exists()
Checks if a file exists. |
java.lang.String |
getName()
Get the file or directory name (the last element of the path). |
FilePath |
getParent()
Get the parent directory of a file or directory. |
int |
getPowerOffCount()
|
java.lang.String |
getScheme()
Get the scheme (prefix) for this file provider. |
boolean |
isAbsolute()
Check if the file name includes a path. |
boolean |
isDirectory()
Check if it is a file or a directory. |
boolean |
isTrace()
|
long |
lastModified()
Get the last modified date of a file |
void |
moveTo(FilePath newName)
Rename a file if this is allowed. |
java.util.List<FilePath> |
newDirectoryStream()
List the files and directories in the given directory. |
java.io.InputStream |
newInputStream()
Create an input stream to read from the file. |
java.io.OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file. |
java.nio.channels.FileChannel |
open(java.lang.String mode)
Open a random access file object. |
static FilePathDebug |
register()
Register the file system. |
void |
setPowerOffCount(int count)
|
boolean |
setReadOnly()
Disable the ability to write. |
void |
setTrace(boolean trace)
|
long |
size()
Get the size of a file in bytes |
FilePath |
toRealPath()
Normalize a file name. |
| Methods inherited from class org.h2.store.fs.FilePathWrapper |
|---|
getBase, getPath, getPrefix, unwrap, unwrap, wrap |
| Methods inherited from class org.h2.store.fs.FilePath |
|---|
get, getNextTempFileNamePart, register, toString, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilePathDebug()
| Method Detail |
|---|
public static FilePathDebug register()
public void createDirectory()
FilePath
createDirectory in class FilePathWrapperpublic boolean createFile()
FilePath
createFile in class FilePathWrapperpublic void delete()
FilePath
delete in class FilePathWrapperpublic boolean exists()
FilePath
exists in class FilePathWrapperpublic java.lang.String getName()
FilePath
getName in class FilePathpublic long lastModified()
FilePath
lastModified in class FilePathWrapperpublic FilePath getParent()
FilePath
getParent in class FilePathWrapperpublic boolean isAbsolute()
FilePath
isAbsolute in class FilePathWrapperpublic boolean isDirectory()
FilePath
isDirectory in class FilePathWrapperpublic boolean canWrite()
FilePath
canWrite in class FilePathWrapperpublic boolean setReadOnly()
FilePath
setReadOnly in class FilePathWrapperpublic long size()
FilePath
size in class FilePathWrapperpublic java.util.List<FilePath> newDirectoryStream()
FilePath
newDirectoryStream in class FilePathWrapperpublic FilePath toRealPath()
FilePath
toRealPath in class FilePathWrapper
public java.io.InputStream newInputStream()
throws java.io.IOException
FilePath
newInputStream in class FilePathWrapperjava.io.IOException
public java.nio.channels.FileChannel open(java.lang.String mode)
throws java.io.IOException
FilePath
open in class FilePathWrappermode - the access mode. Supported are r, rw, rws, rwd
java.io.IOExceptionpublic java.io.OutputStream newOutputStream(boolean append)
FilePath
newOutputStream in class FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated first
public void moveTo(FilePath newName)
FilePath
moveTo in class FilePathWrappernewName - the new fully qualified file name
public FilePath createTempFile(java.lang.String suffix,
boolean deleteOnExit,
boolean inTempDir)
throws java.io.IOException
FilePath
createTempFile in class FilePathWrappersuffix - the suffixdeleteOnExit - if the file should be deleted when the virtual
machine existsinTempDir - if the file should be stored in the temporary directory
java.io.IOExceptionpublic void setPowerOffCount(int count)
public int getPowerOffCount()
public boolean isTrace()
public void setTrace(boolean trace)
public java.lang.String getScheme()
FilePathjava.nio.file.spi.FileSystemProvider.getScheme.
getScheme in class FilePath
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||