Package io.virtdata.docsys.metafs.core
Class MetaPath
- java.lang.Object
-
- io.virtdata.docsys.metafs.core.MetaPath
-
- All Implemented Interfaces:
java.lang.Comparable<java.nio.file.Path>,java.lang.Iterable<java.nio.file.Path>,java.nio.file.Path,java.nio.file.Watchable
public class MetaPath extends java.lang.Object implements java.nio.file.PathA MetaPath represent a logical path for one of any MetaFS derivatives. A MetaPath is meant to be filesystem provider agnostic in terms of the path syntax. Internally, the MetaPath syntax sill defer to the default FileSystem provider's syntax.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]path
-
Method Summary
Modifier and Type Method Description MetaPathasRelativePath()intcompareTo(java.nio.file.Path other)booleanendsWith(java.nio.file.Path other)booleanequals(java.lang.Object o)java.nio.file.PathgetFileName()MetaFSgetFileSystem()java.nio.file.PathgetName(int index)intgetNameCount()java.nio.file.PathgetParent()java.nio.file.PathgetRoot()inthashCode()booleanisAbsolute()java.nio.file.Pathnormalize()java.nio.file.WatchKeyregister(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>[] events, java.nio.file.WatchEvent.Modifier... modifiers)java.nio.file.Pathrelativize(java.nio.file.Path other)java.nio.file.Pathresolve(java.nio.file.Path other)booleanstartsWith(java.nio.file.Path other)java.nio.file.Pathsubpath(int beginIndex, int endIndex)java.nio.file.PathtoAbsolutePath()java.io.FiletoFile()This Path implementation does not allow the caller to break out to File abstractions.java.nio.file.PathtoRealPath(java.nio.file.LinkOption... options)java.lang.StringtoString()java.net.URItoUri()
-
-
-
Method Detail
-
getFileSystem
public MetaFS getFileSystem()
- Specified by:
getFileSystemin interfacejava.nio.file.Path
-
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolutein interfacejava.nio.file.Path
-
getRoot
public java.nio.file.Path getRoot()
- Specified by:
getRootin interfacejava.nio.file.Path
-
getFileName
public java.nio.file.Path getFileName()
- Specified by:
getFileNamein interfacejava.nio.file.Path
-
getParent
public java.nio.file.Path getParent()
- Specified by:
getParentin interfacejava.nio.file.Path
-
getNameCount
public int getNameCount()
- Specified by:
getNameCountin interfacejava.nio.file.Path
-
getName
public java.nio.file.Path getName(int index)
- Specified by:
getNamein interfacejava.nio.file.Path
-
subpath
public java.nio.file.Path subpath(int beginIndex, int endIndex)- Specified by:
subpathin interfacejava.nio.file.Path
-
startsWith
public boolean startsWith(java.nio.file.Path other)
- Specified by:
startsWithin interfacejava.nio.file.Path
-
endsWith
public boolean endsWith(java.nio.file.Path other)
- Specified by:
endsWithin interfacejava.nio.file.Path
-
normalize
public java.nio.file.Path normalize()
- Specified by:
normalizein interfacejava.nio.file.Path
-
resolve
public java.nio.file.Path resolve(java.nio.file.Path other)
- Specified by:
resolvein interfacejava.nio.file.Path
-
relativize
public java.nio.file.Path relativize(java.nio.file.Path other)
- Specified by:
relativizein interfacejava.nio.file.Path
-
toAbsolutePath
public java.nio.file.Path toAbsolutePath()
- Specified by:
toAbsolutePathin interfacejava.nio.file.Path
-
toRealPath
public java.nio.file.Path toRealPath(java.nio.file.LinkOption... options) throws java.io.IOException- Specified by:
toRealPathin interfacejava.nio.file.Path- Throws:
java.io.IOException
-
register
public java.nio.file.WatchKey register(java.nio.file.WatchService watcher, java.nio.file.WatchEvent.Kind<?>[] events, java.nio.file.WatchEvent.Modifier... modifiers) throws java.io.IOException- Specified by:
registerin interfacejava.nio.file.Path- Specified by:
registerin interfacejava.nio.file.Watchable- Throws:
java.io.IOException
-
compareTo
public int compareTo(java.nio.file.Path other)
- Specified by:
compareToin interfacejava.lang.Comparable<java.nio.file.Path>- Specified by:
compareToin interfacejava.nio.file.Path
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfacejava.nio.file.Path- Overrides:
toStringin classjava.lang.Object
-
asRelativePath
public MetaPath asRelativePath()
-
toUri
public java.net.URI toUri()
- Specified by:
toUriin interfacejava.nio.file.Path
-
toFile
public java.io.File toFile()
This Path implementation does not allow the caller to break out to File abstractions.- Specified by:
toFilein interfacejava.nio.file.Path- Returns:
- null, signifying that there are no defined File semantics for a Path
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin interfacejava.nio.file.Path- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.nio.file.Path- Overrides:
hashCodein classjava.lang.Object
-
-