Package org.xwiki.filemanager
Interface FileSystem
@Role
@Unstable
public interface FileSystem
Represents the file system.
- Since:
- 2.0M1
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanDelete(org.xwiki.model.reference.DocumentReference reference) booleancanEdit(org.xwiki.model.reference.DocumentReference reference) booleancanView(org.xwiki.model.reference.DocumentReference reference) voidcopy(org.xwiki.model.reference.DocumentReference source, org.xwiki.model.reference.DocumentReference target) Copy a file or a folder.voiddelete(org.xwiki.model.reference.DocumentReference reference) Delete a file or a folder.booleanexists(org.xwiki.model.reference.DocumentReference reference) getFile(org.xwiki.model.reference.DocumentReference fileReference) getFolder(org.xwiki.model.reference.DocumentReference folderReference) voidrename(org.xwiki.model.reference.DocumentReference oldReference, org.xwiki.model.reference.DocumentReference newReference) Renames the specified file or folder.voidSave a file or a folder.
-
Method Details
-
getFolder
- Parameters:
folderReference- a folder reference- Returns:
- the corresponding folder,
nullif it doesn't exist
-
getFile
- Parameters:
fileReference- a file reference- Returns:
- the corresponding file,
nullif it doesn't exist
-
exists
boolean exists(org.xwiki.model.reference.DocumentReference reference) - Parameters:
reference- a reference to a file or folder- Returns:
trueif the referenced entity exists,falseotherwise
-
canView
boolean canView(org.xwiki.model.reference.DocumentReference reference) - Parameters:
reference- a reference to a file or folder- Returns:
trueif the referenced entity can be viewed by the current user
-
canEdit
boolean canEdit(org.xwiki.model.reference.DocumentReference reference) - Parameters:
reference- a reference to a file or folder- Returns:
trueif the referenced entity can be edited by the current user
-
canDelete
boolean canDelete(org.xwiki.model.reference.DocumentReference reference) - Parameters:
reference- a reference to a file or folder- Returns:
trueif the referenced entity can be deleted by the current user
-
save
Save a file or a folder.- Parameters:
document- a file or a folder
-
delete
void delete(org.xwiki.model.reference.DocumentReference reference) Delete a file or a folder.- Parameters:
reference- a reference to a file or a folder
-
rename
void rename(org.xwiki.model.reference.DocumentReference oldReference, org.xwiki.model.reference.DocumentReference newReference) Renames the specified file or folder.- Parameters:
oldReference- the document to renamenewReference- the new reference
-
copy
void copy(org.xwiki.model.reference.DocumentReference source, org.xwiki.model.reference.DocumentReference target) Copy a file or a folder.- Parameters:
source- the reference to the file or folder to copytarget- the reference to the file or folder to create
-