Package org.xwiki.filemanager
Class Path
- java.lang.Object
-
- org.xwiki.filemanager.Path
-
@Unstable public class Path extends Object
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
Constructors Constructor Description Path(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)org.xwiki.model.reference.DocumentReferencegetFileReference()org.xwiki.model.reference.DocumentReferencegetFolderReference()inthashCode()
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-