public class FilePathRec extends FilePathWrapper
| Constructor and Description |
|---|
FilePathRec() |
| Modifier and Type | Method and Description |
|---|---|
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) |
canWrite, createDirectory, exists, getBase, getParent, getPath, getPrefix, isAbsolute, isDirectory, lastModified, newDirectoryStream, newInputStream, setReadOnly, size, toRealPath, unwrap, unwrap, wrapget, getName, getNextTempFileNamePart, register, toString, unregisterpublic static void register()
public static void setRecorder(Recorder recorder)
recorder - the recorderpublic boolean createFile()
FilePathcreateFile in class FilePathWrapperpublic FilePath createTempFile(java.lang.String suffix, boolean deleteOnExit, boolean inTempDir) throws java.io.IOException
FilePathcreateTempFile 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 directoryjava.io.IOExceptionpublic void delete()
FilePathdelete in class FilePathWrapperpublic 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.io.OutputStream newOutputStream(boolean append)
throws java.io.IOException
FilePathnewOutputStream in class FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated firstjava.io.IOExceptionpublic void moveTo(FilePath newPath, boolean atomicReplace)
FilePathmoveTo 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)