FilePathDebug

A debugging file system that logs all operations.

Methods
static FilePathDebug register()
Register the file system.
static FilePathDebug register()
Register the file system.
Returns:
the instance
boolean canWrite()
boolean canWrite()
void checkPowerOff()
Check if the simulated power failure occurred.
void checkPowerOff() throws IOException
Check if the simulated power failure occurred. This call will decrement the countdown.
Throws:
IOException - if the simulated power failure occurred
void createDirectory()
void createDirectory()
boolean createFile()
boolean createFile()
FilePath createTempFile(String suffix, boolean deleteOnExit, boolean inTempDir)
FilePath createTempFile(String suffix, boolean deleteOnExit, boolean inTempDir) throws IOException
void delete()
void delete()
boolean exists()
boolean exists()
String getName()
String getName()
FilePath getParent()
FilePath getParent()
int getPowerOffCount()
int getPowerOffCount()
String getScheme()
String getScheme()
boolean isAbsolute()
boolean isAbsolute()
boolean isDirectory()
boolean isDirectory()
boolean isTrace()
boolean isTrace()
long lastModified()
long lastModified()
void moveTo(FilePath newName, boolean atomicReplace)
void moveTo(FilePath newName, boolean atomicReplace)
List newDirectoryStream()
List newDirectoryStream()
InputStream newInputStream()
InputStream newInputStream() throws IOException
OutputStream newOutputStream(boolean append)
OutputStream newOutputStream(boolean append) throws IOException
FileChannel open(String mode)
FileChannel open(String mode) throws IOException
void setPowerOffCount(int count)
void setPowerOffCount(int count)
boolean setReadOnly()
boolean setReadOnly()
void setTrace(boolean trace)
void setTrace(boolean trace)
long size()
long size()
FilePath toRealPath()
FilePath toRealPath()
void trace(String fileName, String method, Object... params)
Print a debug message.
void trace(String fileName, String method, Object... params)
Print a debug message.
Parameters:
fileName - the (wrapped) file name
method - the method name
params - parameters if any