Package org.apache.sshd.common.file.util
Class BasePath<T extends BasePath<T,FS>,FS extends BaseFileSystem<T>>
- java.lang.Object
-
- org.apache.sshd.common.file.util.BasePath<T,FS>
-
- Direct Known Subclasses:
RootedPath
,SftpPath
public abstract class BasePath<T extends BasePath<T,FS>,FS extends BaseFileSystem<T>> extends Object implements Path
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
asString()
protected T
asT()
protected int
calculatedHashCode()
protected T
checkPath(Path paramPath)
protected int
compare(String s1, String s2)
int
compareTo(Path paramPath)
protected T
create(String root, String... names)
protected T
create(String root, Collection<String> names)
protected T
create(String root, List<String> names)
boolean
endsWith(String other)
boolean
endsWith(Path other)
protected boolean
endsWith(List<?> list, List<?> other)
boolean
equals(Object obj)
T
getFileName()
FS
getFileSystem()
T
getName(int index)
int
getNameCount()
T
getParent()
T
getRoot()
int
hashCode()
boolean
isAbsolute()
protected boolean
isNormal()
Iterator<Path>
iterator()
T
normalize()
WatchKey
register(WatchService watcher, WatchEvent.Kind<?>... events)
WatchKey
register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers)
T
relativize(Path other)
T
resolve(String other)
T
resolve(Path other)
Path
resolveSibling(String other)
Path
resolveSibling(Path other)
boolean
startsWith(String other)
boolean
startsWith(Path other)
protected boolean
startsWith(List<?> list, List<?> other)
T
subpath(int beginIndex, int endIndex)
T
toAbsolutePath()
File
toFile()
String
toString()
URI
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
-
Methods inherited from interface java.nio.file.Path
toRealPath
-
-
-
-
Method Detail
-
asT
protected T asT()
-
create
protected T create(String root, Collection<String> names)
-
getFileSystem
public FS getFileSystem()
- Specified by:
getFileSystem
in interfacePath
-
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolute
in interfacePath
-
getFileName
public T getFileName()
- Specified by:
getFileName
in interfacePath
-
getNameCount
public int getNameCount()
- Specified by:
getNameCount
in interfacePath
-
startsWith
public boolean startsWith(Path other)
- Specified by:
startsWith
in interfacePath
-
startsWith
public boolean startsWith(String other)
- Specified by:
startsWith
in interfacePath
-
isNormal
protected boolean isNormal()
-
resolveSibling
public Path resolveSibling(Path other)
- Specified by:
resolveSibling
in interfacePath
-
resolveSibling
public Path resolveSibling(String other)
- Specified by:
resolveSibling
in interfacePath
-
relativize
public T relativize(Path other)
- Specified by:
relativize
in interfacePath
-
toAbsolutePath
public T toAbsolutePath()
- Specified by:
toAbsolutePath
in interfacePath
-
register
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws IOException
- 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
-
compareTo
public int compareTo(Path paramPath)
-
hashCode
public int hashCode()
-
calculatedHashCode
protected int calculatedHashCode()
-
equals
public boolean equals(Object obj)
-
toString
public String toString()
-
asString
protected String asString()
-
-