|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.util.vfs.VFSManager
public class VFSManager
| Constructor Summary | |
|---|---|
VFSManager()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
appendNumberAtTheEndOfFilename(java.lang.String name,
int number)
Sticks together a new filename. |
static boolean |
copyContent(java.io.InputStream inStream,
VFSLeaf target)
Copies the stream to the target leaf. |
static boolean |
copyContent(java.io.InputStream inStream,
VFSLeaf target,
boolean closeInput)
Copies the stream to the target leaf. |
static boolean |
copyContent(VFSLeaf source,
VFSLeaf target)
Copies the content of the source to the target leaf. |
static boolean |
exists(VFSItem item)
Check if the file exist or not |
static java.lang.String |
extractChild(java.lang.String path)
Extract the next subfolder (e.g. |
static VFSSecurityCallback |
findInheritedSecurityCallback(VFSItem vfsItem)
Get the security callback which affects this item. |
static VFSContainer |
findInheritingSecurityCallbackContainer(VFSItem vfsItem)
Get the container which security callback affects this item. |
static java.lang.Object[] |
findWritableRootFolderFor(VFSContainer rootDir,
java.lang.String relFilePath)
This method takes a VFSContainer and a relative path to a file that exists within this container. |
static long |
getQuotaLeftKB(VFSContainer container)
Check the quota usage on this VFSContainer. |
static java.lang.String |
getRealPath(VFSContainer container)
Returns the real path of the given VFS container. |
static long |
getUsageKB(VFSItem vfsItem)
Recursively traverse the container and sum up all leafs' sizes. |
static boolean |
isContainerDescendantOrSelf(VFSContainer descendant,
VFSContainer root)
Check if descendant is indeed a descendant of root.. |
static boolean |
isSelfOrParent(VFSContainer descendant,
VFSContainer parent)
Check if descendant is child of parent or same as parent. |
static Quota |
isTopLevelQuotaContainer(VFSContainer container)
Check wether this container has a quota assigned to itself. |
static VFSItem |
resolveFile(VFSContainer rootContainer,
java.lang.String path)
|
static java.lang.String |
sanitizePath(java.lang.String path)
Make sure we always have a path that starts with a "/". |
static java.lang.String |
similarButNonExistingName(VFSContainer root,
java.lang.String name)
Returns a similar but non existing file name in root based on the given name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VFSManager()
| Method Detail |
|---|
public static java.lang.String sanitizePath(java.lang.String path)
path -
public static java.lang.String extractChild(java.lang.String path)
path -
public static boolean isContainerDescendantOrSelf(VFSContainer descendant,
VFSContainer root)
parent - child -
public static boolean isSelfOrParent(VFSContainer descendant,
VFSContainer parent)
descendant - root -
public static VFSItem resolveFile(VFSContainer rootContainer,
java.lang.String path)
org.olat.core.util.vfs.VFSItem#resolveFile(java.lang.String)public static VFSSecurityCallback findInheritedSecurityCallback(VFSItem vfsItem)
vfsItem -
public static VFSContainer findInheritingSecurityCallbackContainer(VFSItem vfsItem)
vfsItem -
public static Quota isTopLevelQuotaContainer(VFSContainer container)
container -
public static long getQuotaLeftKB(VFSContainer container)
securityCallback - container -
public static long getUsageKB(VFSItem vfsItem)
container -
public static java.lang.String getRealPath(VFSContainer container)
container -
public static java.lang.Object[] findWritableRootFolderFor(VFSContainer rootDir,
java.lang.String relFilePath)
rootDir - the container that should be checkedrelFilePath - The valid file path within this container
public static java.lang.String similarButNonExistingName(VFSContainer root,
java.lang.String name)
root - name -
public static java.lang.String appendNumberAtTheEndOfFilename(java.lang.String name,
int number)
name - number -
public static boolean copyContent(VFSLeaf source,
VFSLeaf target)
source - target -
public static boolean copyContent(java.io.InputStream inStream,
VFSLeaf target)
source - target -
public static boolean copyContent(java.io.InputStream inStream,
VFSLeaf target,
boolean closeInput)
source - target - closeInput - set to false if it's a ZipInputStream
public static boolean exists(VFSItem item)
item -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||