public class FilePathRec extends FilePathWrapper
| Constructor and Description |
|---|
FilePathRec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createFile()
Create a new file.
|
FilePath |
createTempFile(String suffix,
boolean deleteOnExit,
boolean inTempDir)
Create a new temporary file.
|
void |
delete()
Delete a file or directory if it exists.
|
String |
getScheme()
Get the prefix for this file system.
|
boolean |
isTrace() |
void |
moveTo(FilePath newPath)
Rename a file if this is allowed.
|
OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file.
|
FileChannel |
open(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(String suffix, boolean deleteOnExit, boolean inTempDir) throws 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 directoryIOExceptionpublic void delete()
FilePathdelete in class FilePathWrapperpublic FileChannel open(String mode) throws IOException
FilePathopen in class FilePathWrappermode - the access mode. Supported are r, rw, rws, rwdIOExceptionpublic OutputStream newOutputStream(boolean append)
FilePathnewOutputStream in class FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated firstpublic void moveTo(FilePath newPath)
FilePathmoveTo in class FilePathWrappernewPath - the new fully qualified file namepublic boolean isTrace()
public void setTrace(boolean trace)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.