Package org.mycore.datamodel.niofs
Class MCRPath
java.lang.Object
org.mycore.datamodel.niofs.MCRPath
IFS implementation of the
Path
interface.
Absolute path have this form: {owner}':/'{path}
- Author:
- Thomas Scheffler (yagee)
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
boolean
abstract MCRAbstractFileSystem
getName
(int index) int
getOwner()
static MCRPath
getRoot()
static MCRPath
getRootPath
(String owner) Returns the root directory for a given derivate.int
hashCode()
boolean
iterator()
register
(WatchService watcher, WatchEvent.Kind<?>... events) register
(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) relativize
(Path other) resolveSibling
(String other) resolveSibling
(Path other) boolean
startsWith
(String other) boolean
startsWith
(Path other) subpath
(int beginIndex, int endIndex) returns complete subpath.toFile()
static MCRPath
toRealPath
(LinkOption... options) toString()
toUri()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
toMCRPath
-
getPath
-
getRootPath
Returns the root directory for a given derivate.- Parameters:
owner
- the file owner (usually the id of a derivate)- Returns:
- the root path
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Path>
- Specified by:
compareTo
in interfacePath
-
endsWith
-
endsWith
-
equals
-
getFileName
- Specified by:
getFileName
in interfacePath
-
getFileSystem
- Specified by:
getFileSystem
in interfacePath
-
getName
-
getNameCount
public int getNameCount()- Specified by:
getNameCount
in interfacePath
-
getOwner
-
getOwnerRelativePath
-
subpathComplete
returns complete subpath. same assubpath(int, int)
with '0' and 'getNameCount()
'. -
getParent
-
getRoot
-
hashCode
public int hashCode() -
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolute
in interfacePath
-
iterator
-
normalize
-
register
- Specified by:
register
in interfacePath
- Specified by:
register
in interfaceWatchable
- Throws:
IOException
-
register
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException - Specified by:
register
in interfacePath
- Specified by:
register
in interfaceWatchable
- Throws:
IOException
-
relativize
- Specified by:
relativize
in interfacePath
-
resolve
-
resolve
-
resolveSibling
- Specified by:
resolveSibling
in interfacePath
-
resolveSibling
- Specified by:
resolveSibling
in interfacePath
-
startsWith
- Specified by:
startsWith
in interfacePath
-
startsWith
- Specified by:
startsWith
in interfacePath
-
subpath
-
toAbsolutePath
- Specified by:
toAbsolutePath
in interfacePath
-
toFile
-
toRealPath
- Specified by:
toRealPath
in interfacePath
- Throws:
IOException
-
toPhysicalPath
- Throws:
IOException
-
toString
-
toUri
-