public class FilePathReorderWrites extends FilePathWrapper
| Constructor and Description |
|---|
FilePathReorderWrites() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete a file or directory if it exists.
|
long |
getMaxAge() |
int |
getPowerOffCountdown() |
java.lang.String |
getScheme()
Get the scheme (prefix) for this file provider.
|
java.nio.channels.FileChannel |
open(java.lang.String mode)
Open a random access file object.
|
static FilePathReorderWrites |
register()
Register the file system.
|
static void |
setPartialWrites(boolean b)
Whether partial writes are possible (writing only part of the data).
|
void |
setPowerOffCountdown(int count,
int seed)
Set the number of write operations before a simulated power failure, and
the random seed (for partial writes).
|
canWrite, createDirectory, createFile, createTempFile, exists, getBase, getParent, getPath, getPrefix, isAbsolute, isDirectory, lastModified, moveTo, newDirectoryStream, newInputStream, newOutputStream, setReadOnly, size, toRealPath, unwrap, unwrap, wrapget, getName, getNextTempFileNamePart, register, toString, unregisterpublic static FilePathReorderWrites register()
public void setPowerOffCountdown(int count,
int seed)
count - the number of write operations (0 to never fail,
Integer.MAX_VALUE to count the operations)seed - the new seedpublic int getPowerOffCountdown()
public static void setPartialWrites(boolean b)
b - true to enablepublic java.nio.channels.FileChannel open(java.lang.String mode)
throws java.io.IOException
FilePathopen in class FilePathWrappermode - the access mode. Supported are r, rw, rws, rwdjava.io.IOExceptionpublic java.lang.String getScheme()
FilePathjava.nio.file.spi.FileSystemProvider.getScheme.public long getMaxAge()
public void delete()
FilePathdelete in class FilePathWrapper