|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.store.fs.FileSystem
org.h2.store.fs.FileSystemWrapper
org.h2.store.fs.RecordingFileSystem
public class RecordingFileSystem
A file system that records all write operations and can re-play them.
| Field Summary | |
|---|---|
static java.lang.String |
PREFIX
The prefix used for a debugging file system. |
| Constructor Summary | |
|---|---|
RecordingFileSystem()
|
|
| Method Summary | |
|---|---|
void |
createDirs(java.lang.String fileName)
Create all required directories that are required for this file. |
boolean |
createNewFile(java.lang.String fileName)
Create a new file. |
java.lang.String |
createTempFile(java.lang.String prefix,
java.lang.String suffix,
boolean deleteOnExit,
boolean inTempDir)
Create a new temporary file. |
void |
delete(java.lang.String fileName)
Delete a file. |
void |
deleteRecursive(java.lang.String directory,
boolean tryOnly)
Delete a directory or file and all subdirectories and files. |
java.lang.String |
getPrefix()
Get the prefix for this file system. |
boolean |
isTrace()
|
FileObject |
openFileObject(java.lang.String fileName,
java.lang.String mode)
Open a random access file object. |
java.io.OutputStream |
openFileOutputStream(java.lang.String fileName,
boolean append)
Create an output stream to write into the file. |
static void |
register()
Register the file system. |
void |
rename(java.lang.String oldName,
java.lang.String newName)
Rename a file if this is allowed. |
static void |
setRecorder(Recorder recorder)
Set the recorder class. |
void |
setTrace(boolean trace)
|
boolean |
tryDelete(java.lang.String fileName)
Try to delete a file. |
| Methods inherited from class org.h2.store.fs.FileSystemWrapper |
|---|
accepts, canWrite, exists, fileStartsWith, getCanonicalPath, getFileName, getLastModified, getParent, isAbsolute, isDirectory, isReadOnly, length, listFiles, openFileInputStream, setReadOnly, unwrap |
| Methods inherited from class org.h2.store.fs.FileSystem |
|---|
getInstance, getNextTempFileNamePart, register, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PREFIX
| Constructor Detail |
|---|
public RecordingFileSystem()
| Method Detail |
|---|
public static void register()
public static void setRecorder(Recorder recorder)
recorder - the recorderpublic void createDirs(java.lang.String fileName)
FileSystem
createDirs in class FileSystemWrapperfileName - the file name (not directory name)public boolean createNewFile(java.lang.String fileName)
FileSystem
createNewFile in class FileSystemWrapperfileName - the file name
public java.lang.String createTempFile(java.lang.String prefix,
java.lang.String suffix,
boolean deleteOnExit,
boolean inTempDir)
throws java.io.IOException
FileSystem
createTempFile in class FileSystemWrapperprefix - the prefix of the file name (including directory name if
required)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.IOExceptionpublic void delete(java.lang.String fileName)
FileSystem
delete in class FileSystemWrapperfileName - the file name
public void deleteRecursive(java.lang.String directory,
boolean tryOnly)
FileSystem
deleteRecursive in class FileSystemWrapperdirectory - the directorytryOnly - whether errors should be ignored
public FileObject openFileObject(java.lang.String fileName,
java.lang.String mode)
throws java.io.IOException
FileSystem
openFileObject in class FileSystemWrapperfileName - the file namemode - the access mode. Supported are r, rw, rws, rwd
java.io.IOException
public java.io.OutputStream openFileOutputStream(java.lang.String fileName,
boolean append)
FileSystem
openFileOutputStream in class FileSystemWrapperfileName - the file nameappend - if true, the file will grow, if false, the file will be
truncated first
public void rename(java.lang.String oldName,
java.lang.String newName)
FileSystem
rename in class FileSystemWrapperoldName - the old fully qualified file namenewName - the new fully qualified file namepublic boolean tryDelete(java.lang.String fileName)
FileSystem
tryDelete in class FileSystemWrapperfileName - the file name
public java.lang.String getPrefix()
FileSystemWrapper
getPrefix in class FileSystemWrapperpublic boolean isTrace()
public void setTrace(boolean trace)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||