|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.fs.FileSystemResource
public class FileSystemResource
A FileSystemResource represents a resource (i.e. file) in a
FileSystem.
| Field Summary | |
|---|---|
protected FileSystem |
fs
|
protected java.lang.String |
path
|
| Constructor Summary | |
|---|---|
FileSystemResource(FileSystem fs,
java.lang.String path)
Creates a new FileSystemResource |
|
| Method Summary | |
|---|---|
void |
delete()
Deletes this resource. |
void |
delete(boolean pruneEmptyParentDirs)
Deletes this resource. |
boolean |
equals(java.lang.Object obj)
|
boolean |
exists()
|
FileSystem |
getFileSystem()
Returns the FileSystem where this resource is located. |
java.io.InputStream |
getInputStream()
|
java.lang.String |
getName()
Returns the name of this resource. |
java.io.OutputStream |
getOutputStream()
|
java.lang.String |
getParentDir()
Returns the parent directory of this resource. |
java.lang.String |
getPath()
Returns the path of this resource. |
RandomAccessOutputStream |
getRandomAccessOutputStream()
|
int |
hashCode()
Returns zero to satisfy the Object equals/hashCode contract. |
long |
lastModified()
|
long |
length()
|
void |
makeParentDirs()
Creates the parent directory of this resource, including any necessary but nonexistent parent directories. |
void |
move(java.lang.String destPath)
|
void |
spool(java.io.OutputStream out)
Spools this resource to the given output stream. |
java.lang.String |
toString()
Returns the path string of this resource. |
void |
touch()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final FileSystem fs
protected final java.lang.String path
| Constructor Detail |
|---|
public FileSystemResource(FileSystem fs,
java.lang.String path)
FileSystemResource
fs - the FileSystem where the resource is locatedpath - the path of the resource in the FileSystem| Method Detail |
|---|
public FileSystem getFileSystem()
FileSystem where this resource is located.
FileSystem where this resource is located.public java.lang.String getPath()
public java.lang.String getParentDir()
public java.lang.String getName()
public void makeParentDirs()
throws FileSystemException
FileSystemException
public void delete()
throws FileSystemException
#delete(false).
FileSystemExceptionFileSystem.deleteFile(java.lang.String)
public void delete(boolean pruneEmptyParentDirs)
throws FileSystemException
pruneEmptyParentDirs - if true, empty parent folders will
automatically be deleted
FileSystemExceptionFileSystem.deleteFile(java.lang.String)
public boolean exists()
throws FileSystemException
FileSystemExceptionFileSystem.exists(java.lang.String)
public java.io.InputStream getInputStream()
throws FileSystemException
FileSystemExceptionFileSystem.getInputStream(java.lang.String)
public void spool(java.io.OutputStream out)
throws FileSystemException,
java.io.IOException
out - output stream where to spool the resource
FileSystemException - if the input stream for this resource could
not be obtained
java.io.IOException - if an error occurs while while spoolingFileSystem.getInputStream(java.lang.String)
public java.io.OutputStream getOutputStream()
throws FileSystemException
FileSystemExceptionFileSystem.getOutputStream(java.lang.String)
public RandomAccessOutputStream getRandomAccessOutputStream()
throws FileSystemException
FileSystemExceptionFileSystem.getRandomAccessOutputStream(java.lang.String)
public long lastModified()
throws FileSystemException
FileSystemExceptionFileSystem.lastModified(java.lang.String)
public long length()
throws FileSystemException
FileSystemExceptionFileSystem.length(java.lang.String)
public void touch()
throws FileSystemException
FileSystemExceptionFileSystem.touch(java.lang.String)
public void move(java.lang.String destPath)
throws FileSystemException
FileSystemExceptionFileSystem.move(java.lang.String, java.lang.String)public java.lang.String toString()
getPath() method.
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||