Package org.apache.sshd.common.file.util
Class BaseFileSystem<T extends Path>
- java.lang.Object
-
- java.nio.file.FileSystem
-
- org.apache.sshd.common.file.util.BaseFileSystem<T>
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
RootedFileSystem
,SftpFileSystem
public abstract class BaseFileSystem<T extends Path> extends FileSystem
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description BaseFileSystem(FileSystemProvider fileSystemProvider)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
appendDedupSep(StringBuilder sb, CharSequence s)
protected T
create(String root, String... names)
protected T
create(String root, Collection<String> names)
protected abstract T
create(String root, List<String> names)
T
getDefaultDir()
Iterable<FileStore>
getFileStores()
T
getPath(String first, String... more)
PathMatcher
getPathMatcher(String syntaxAndPattern)
Iterable<Path>
getRootDirectories()
String
getSeparator()
protected String
globToRegex(String pattern)
boolean
isReadOnly()
WatchService
newWatchService()
FileSystemProvider
provider()
-
Methods inherited from class java.nio.file.FileSystem
close, getUserPrincipalLookupService, isOpen, supportedFileAttributeViews
-
-
-
-
Constructor Detail
-
BaseFileSystem
public BaseFileSystem(FileSystemProvider fileSystemProvider)
-
-
Method Detail
-
getDefaultDir
public T getDefaultDir()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in classFileSystem
-
provider
public FileSystemProvider provider()
- Specified by:
provider
in classFileSystem
-
getSeparator
public String getSeparator()
- Specified by:
getSeparator
in classFileSystem
-
getRootDirectories
public Iterable<Path> getRootDirectories()
- Specified by:
getRootDirectories
in classFileSystem
-
getFileStores
public Iterable<FileStore> getFileStores()
- Specified by:
getFileStores
in classFileSystem
-
getPath
public T getPath(String first, String... more)
- Specified by:
getPath
in classFileSystem
-
appendDedupSep
protected void appendDedupSep(StringBuilder sb, CharSequence s)
-
getPathMatcher
public PathMatcher getPathMatcher(String syntaxAndPattern)
- Specified by:
getPathMatcher
in classFileSystem
-
newWatchService
public WatchService newWatchService() throws IOException
- Specified by:
newWatchService
in classFileSystem
- Throws:
IOException
-
create
protected T create(String root, Collection<String> names)
-
-