Package org.xwiki.filemanager
Interface FileSystem
-
@Role @Unstable public interface FileSystemRepresents the file system.- Since:
- 2.0M1
- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanDelete(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)FilegetFile(org.xwiki.model.reference.DocumentReference fileReference)FoldergetFolder(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(Document document)Save a file or a folder.
-
-
-
Method Detail
-
getFolder
Folder getFolder(org.xwiki.model.reference.DocumentReference folderReference)
- Parameters:
folderReference- a folder reference- Returns:
- the corresponding folder,
nullif it doesn't exist
-
getFile
File getFile(org.xwiki.model.reference.DocumentReference fileReference)
- 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
void save(Document document)
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
-
-