|
||||||||
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 FilePathWrapper
public boolean createFile()
FilePath
createFile
in class FilePathWrapper
public void delete()
FilePath
delete
in class FilePathWrapper
public boolean exists()
FilePath
exists
in class FilePathWrapper
public java.lang.String getName()
FilePath
getName
in class FilePath
public long lastModified()
FilePath
lastModified
in class FilePathWrapper
public FilePath getParent()
FilePath
getParent
in class FilePathWrapper
public boolean isAbsolute()
FilePath
isAbsolute
in class FilePathWrapper
public boolean isDirectory()
FilePath
isDirectory
in class FilePathWrapper
public boolean canWrite()
FilePath
canWrite
in class FilePathWrapper
public boolean setReadOnly()
FilePath
setReadOnly
in class FilePathWrapper
public long size()
FilePath
size
in class FilePathWrapper
public java.util.List<FilePath> newDirectoryStream()
FilePath
newDirectoryStream
in class FilePathWrapper
public FilePath toRealPath()
FilePath
toRealPath
in class FilePathWrapper
public java.io.InputStream newInputStream() throws java.io.IOException
FilePath
newInputStream
in class FilePathWrapper
java.io.IOException
public java.nio.channels.FileChannel open(java.lang.String mode) throws java.io.IOException
FilePath
open
in class FilePathWrapper
mode
- the access mode. Supported are r, rw, rws, rwd
java.io.IOException
public java.io.OutputStream newOutputStream(boolean append)
FilePath
newOutputStream
in class FilePathWrapper
append
- if true, the file will grow, if false, the file will be
truncated first
public void moveTo(FilePath newName)
FilePath
moveTo
in class FilePathWrapper
newName
- the new fully qualified file namepublic FilePath createTempFile(java.lang.String suffix, boolean deleteOnExit, boolean inTempDir) throws java.io.IOException
FilePath
createTempFile
in class FilePathWrapper
suffix
- 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.IOException
public void setPowerOffCount(int count)
public int getPowerOffCount()
public boolean isTrace()
public void setTrace(boolean trace)
public java.lang.String getScheme()
FilePath
java.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 |