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, wrap
get, getName, getNextTempFileNamePart, register, toString, unregister
public static void register()
public static void setRecorder(Recorder recorder)
recorder
- the recorderpublic boolean createFile()
FilePath
createFile
in class FilePathWrapper
public FilePath createTempFile(String suffix, boolean deleteOnExit, boolean inTempDir) throws IOException
FilePath
createTempFile
in class FilePathWrapper
suffix
- the suffixdeleteOnExit
- if the file should be deleted when the virtual
machine existsinTempDir
- if the file should be stored in the temporary directoryIOException
public void delete()
FilePath
delete
in class FilePathWrapper
public FileChannel open(String mode) throws IOException
FilePath
open
in class FilePathWrapper
mode
- the access mode. Supported are r, rw, rws, rwdIOException
public OutputStream newOutputStream(boolean append)
FilePath
newOutputStream
in class FilePathWrapper
append
- if true, the file will grow, if false, the file will be
truncated firstpublic void moveTo(FilePath newPath)
FilePath
moveTo
in class FilePathWrapper
newPath
- the new fully qualified file namepublic boolean isTrace()
public void setTrace(boolean trace)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.