public interface FileResource<T extends FileResource<T>> extends Resource<File>
| Modifier and Type | Method and Description |
|---|---|
boolean |
createNewFile()
Create the file in the underlying resource system.
|
T |
createTempResource()
Create a temporary
FileResource |
void |
deleteOnExit()
Requests that the file or directory denoted by this resource be deleted when the virtual machine terminates.
|
boolean |
isDirectory()
Return true if this
FileResource exists and is actually a directory, otherwise return false; |
boolean |
isStale()
Returns true if the underlying resource has been modified on the file system since it was initially loaded.
|
void |
markUpToDate()
Re-read the last modified timestamp for this resource.
|
boolean |
mkdir()
Create a new single directory for this resource.
|
boolean |
mkdirs()
Create all directories required for this resource to exist.
|
boolean |
renameTo(FileResource<?> target)
Rename this
Resource to the given FileResource |
boolean |
renameTo(String pathspec)
Rename this
Resource to the given path. |
T |
setContents(char[] data)
Set the contents of this
FileResource to the given character array. |
T |
setContents(InputStream data)
Set the contents of this
FileResource to the contents of the given InputStream. |
T |
setContents(String data)
Set the contents of this
FileResource to the given String |
createFrom, delete, delete, exists, getChild, getFullyQualifiedName, getName, getParent, getResourceFactory, getResourceInputStream, getUnderlyingResourceObject, listResources, listResources, reifyboolean isDirectory()
FileResource exists and is actually a directory, otherwise return false;boolean isStale()
void markUpToDate()
boolean mkdir()
mkdirs()boolean mkdirs()
void deleteOnExit()
Once deletion has been requested, it is not possible to cancel the request. This method should therefore be used with care.
T setContents(String data)
FileResource to the given StringT setContents(char[] data)
FileResource to the given character array.T setContents(InputStream data)
FileResource to the contents of the given InputStream.boolean createNewFile()
T createTempResource()
FileResourceboolean renameTo(FileResource<?> target)
Resource to the given FileResourceCopyright © 2013 JBoss by Red Hat. All Rights Reserved.