Package org.xwiki.filemanager
Class Path
java.lang.Object
org.xwiki.filemanager.Path
Represents a path in the file system. A path is uniquely determined either by a folder or by a (folder, file) pair. A
file cannot specify the path alone because files can have multiple parent folders (so a file can have multiple
paths).
- Since:
- 2.0M1
- Version:
- $Id$
-
Constructor Summary
ConstructorsConstructorDescriptionPath(org.xwiki.model.reference.DocumentReference folderReference) Creates a new path that is determined by the specified folder.Path(org.xwiki.model.reference.DocumentReference folderReference, org.xwiki.model.reference.DocumentReference fileReference) Creates a new path that is determined by the given (folder, file) pair. -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.xwiki.model.reference.DocumentReferenceorg.xwiki.model.reference.DocumentReferenceinthashCode()
-
Constructor Details
-
Path
public Path(org.xwiki.model.reference.DocumentReference folderReference) Creates a new path that is determined by the specified folder. Folders have one single path.- Parameters:
folderReference- a reference to a document that represents a folder
-
Path
public Path(org.xwiki.model.reference.DocumentReference folderReference, org.xwiki.model.reference.DocumentReference fileReference) Creates a new path that is determined by the given (folder, file) pair. Files can have multiple paths (because they can have multiple parent folders) so you need to choose a parent in order to determine the path.- Parameters:
folderReference- a reference to a document that represents a folderfileReference- a reference to a document that represents a file
-
-
Method Details
-
getFolderReference
public org.xwiki.model.reference.DocumentReference getFolderReference()- Returns:
- the folder reference
-
getFileReference
public org.xwiki.model.reference.DocumentReference getFileReference()- Returns:
- the file reference, or
nullif this path was specified only by its folder
-
hashCode
public int hashCode() -
equals
-