|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.fs.FileSystemResource
A FileSystemResource
represents a resource (i.e. file) in a
FileSystem
.
Field Summary | |
protected FileSystem |
fs
|
protected String |
path
|
Constructor Summary | |
FileSystemResource(FileSystem fs,
String path)
Creates a new FileSystemResource |
Method Summary | |
void |
delete()
Deletes this resource. |
void |
delete(boolean pruneEmptyParentDirs)
Deletes this resource. |
boolean |
equals(Object obj)
|
boolean |
exists()
|
FileSystem |
getFileSystem()
Returns the FileSystem where this resource is located. |
InputStream |
getInputStream()
|
String |
getName()
Returns the name of this resource. |
OutputStream |
getOutputStream()
|
String |
getParentDir()
Returns the parent directory of this resource. |
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(String destPath)
|
void |
spool(OutputStream out)
Spools this resource to the given output stream. |
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 String path
Constructor Detail |
public FileSystemResource(FileSystem fs, 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 String getPath()
public String getParentDir()
public String getName()
public void makeParentDirs() throws FileSystemException
FileSystemException
public void delete() throws FileSystemException
#delete(false)
.
FileSystemException
FileSystem.deleteFile(java.lang.String)
public void delete(boolean pruneEmptyParentDirs) throws FileSystemException
pruneEmptyParentDirs
- if true
, empty parent folders will
automatically be deleted
FileSystemException
FileSystem.deleteFile(java.lang.String)
public boolean exists() throws FileSystemException
FileSystemException
FileSystem.exists(java.lang.String)
public InputStream getInputStream() throws FileSystemException
FileSystemException
FileSystem.getInputStream(java.lang.String)
public void spool(OutputStream out) throws FileSystemException, IOException
out
- output stream where to spool the resource
FileSystemException
- if the input stream for this resource could
not be obtained
IOException
- if an error occurs while while spoolingFileSystem.getInputStream(java.lang.String)
public OutputStream getOutputStream() throws FileSystemException
FileSystemException
FileSystem.getOutputStream(java.lang.String)
public RandomAccessOutputStream getRandomAccessOutputStream() throws FileSystemException
FileSystemException
FileSystem.getRandomAccessOutputStream(java.lang.String)
public long lastModified() throws FileSystemException
FileSystemException
FileSystem.lastModified(java.lang.String)
public long length() throws FileSystemException
FileSystemException
FileSystem.length(java.lang.String)
public void touch() throws FileSystemException
FileSystemException
FileSystem.touch(java.lang.String)
public void move(String destPath) throws FileSystemException
FileSystemException
FileSystem.move(java.lang.String, java.lang.String)
public String toString()
getPath()
method.
public boolean equals(Object obj)
public int hashCode()
Object.hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |