|
||||||||
| 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.store.fs.FilePathRec
public class FilePathRec
A file system that records all write operations and can re-play them.
| Field Summary |
|---|
| Fields inherited from class org.h2.store.fs.FilePath |
|---|
name |
| Constructor Summary | |
|---|---|
FilePathRec()
|
|
| Method Summary | |
|---|---|
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. |
java.lang.String |
getScheme()
Get the prefix for this file system. |
boolean |
isTrace()
|
void |
moveTo(FilePath newPath,
boolean atomicReplace)
Rename a file if this is allowed. |
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 void |
register()
Register the file system. |
static void |
setRecorder(Recorder recorder)
Set the recorder class. |
void |
setTrace(boolean trace)
|
| Methods inherited from class org.h2.store.fs.FilePathWrapper |
|---|
canWrite, createDirectory, exists, getBase, getParent, getPath, getPrefix, isAbsolute, isDirectory, lastModified, newDirectoryStream, newInputStream, setReadOnly, size, toRealPath, unwrap, unwrap, wrap |
| Methods inherited from class org.h2.store.fs.FilePath |
|---|
get, getName, getNextTempFileNamePart, register, toString, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilePathRec()
| Method Detail |
|---|
public static void register()
public static void setRecorder(Recorder recorder)
recorder - the recorderpublic boolean createFile()
FilePath
createFile in class FilePathWrapper
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 delete()
FilePath
delete in class FilePathWrapper
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.IOException
public java.io.OutputStream newOutputStream(boolean append)
throws java.io.IOException
FilePath
newOutputStream in class FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated first
java.io.IOException
public void moveTo(FilePath newPath,
boolean atomicReplace)
FilePath
moveTo in class FilePathWrappernewPath - the new fully qualified file nameatomicReplace - whether the move should be atomic, and the target
file should be replaced if it exists and replacing is possiblepublic boolean isTrace()
public void setTrace(boolean trace)
public java.lang.String getScheme()
getScheme in class FilePath
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||