org.olat.core.util.vfs
Class LocalFileImpl
java.lang.Object
org.olat.core.util.vfs.LocalImpl
org.olat.core.util.vfs.LocalFileImpl
- All Implemented Interfaces:
- Versionable, VFSItem, VFSLeaf
- Direct Known Subclasses:
- OlatRootFileImpl
public class LocalFileImpl
- extends LocalImpl
- implements VFSLeaf, Versionable
Description:
VFSLeaf implementation that is based on a java.io.File from a local filesystem
Initial Date: 23.06.2005
- Author:
- Felix Jost
| Methods inherited from class org.olat.core.util.vfs.LocalImpl |
canCopy, canDelete, canRename, canWrite, getBasefile, getLastModified, getLocalSecurityCallback, getName, getParentContainer, isSame, setLocalSecurityCallback, setParentContainer |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.olat.core.util.vfs.VFSItem |
canCopy, canDelete, canRename, canWrite, getLastModified, getLocalSecurityCallback, getName, getParentContainer, isSame, setLocalSecurityCallback, setParentContainer |
LocalFileImpl
public LocalFileImpl(java.io.File file)
- Constructor
- Parameters:
file - The real file wrapped by this VFSLeaf
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStream in interface VFSLeaf
- Returns:
- is or null (if e.g. the underlying file no longer exists)
- See Also:
VFSLeaf.getInputStream()
getSize
public long getSize()
- Specified by:
getSize in interface VFSLeaf
- Returns:
- size
- See Also:
VFSLeaf.getSize()
getOutputStream
public java.io.OutputStream getOutputStream(boolean append)
- Specified by:
getOutputStream in interface VFSLeaf
- Returns:
- os
- See Also:
VFSLeaf.getOutputStream(boolean)
getVersions
public Versions getVersions()
- Specified by:
getVersions in interface Versionable
- Returns:
- @see org.olat.core.util.vfs.version.Versions
rename
public VFSStatus rename(java.lang.String newname)
- Specified by:
rename in interface VFSItem- Specified by:
rename in class LocalImpl
- Parameters:
newname - e.g test.txt or myfolder (no path prepended)
- Returns:
- status
- See Also:
VFSItem.rename(java.lang.String)
delete
public VFSStatus delete()
- Description copied from interface:
VFSItem
- deltes the item. if the item is a container, all children will be deleted recursively
- Specified by:
delete in interface VFSItem- Specified by:
delete in class LocalImpl
- Returns:
- status
- See Also:
VFSItem.delete()
resolve
public VFSItem resolve(java.lang.String path)
- Description copied from interface:
VFSItem
- a relative path. the implementation will search all its children.
e.g. bla/blu/bli.txt this vfsitem's name must thus be 'bla'
- Specified by:
resolve in interface VFSItem
- Returns:
- See Also:
org.olat.core.util.vfs.VFSItem#resolveFile(java.lang.String)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()