|
Forge - Resource Addon API 2.0.0.Alpha3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileResource<T extends FileResource<T>>
A standard, built-in resource for representing files on the filesystem.
| Method Summary | |
|---|---|
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. |
long |
getSize()
Returns the size of the file denoted by this abstract pathname |
boolean |
isDirectory()
Return true if this FileResource exists and is actually a directory, otherwise return false; |
boolean |
isExecutable()
Returns if a file is executable |
boolean |
isReadable()
Returns if a file is readable |
boolean |
isStale()
Returns true if the underlying resource has been modified on the file system since it was initially loaded. |
boolean |
isWritable()
Returns if a file is writable |
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 |
| Methods inherited from interface org.jboss.forge.resource.Resource |
|---|
createFrom, delete, delete, exists, getChild, getFullyQualifiedName, getName, getParent, getResourceFactory, getResourceInputStream, getUnderlyingResourceObject, listResources, listResources, reify |
| Methods inherited from interface org.jboss.forge.facets.Faceted |
|---|
getFacet, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, install, supports, uninstall |
| Method Detail |
|---|
boolean 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 String
T 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()
FileResource
boolean renameTo(String pathspec)
Resource to the given path.
boolean renameTo(FileResource<?> target)
Resource to the given FileResource
long getSize()
boolean isWritable()
boolean isReadable()
boolean isExecutable()
|
Forge - Resource Addon API 2.0.0.Alpha3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||