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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FileSystemProviderprotected final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected Tprotected Tcreate(String root, Collection<String> names) protected abstract TgetPathMatcher(String syntaxAndPattern) protected StringglobToRegex(String pattern) protected StringhandleWindowsSeparator(String name) In case we are running on Windows, accept "\\" as a file separator.protected booleanbooleanprovider()Methods inherited from class java.nio.file.FileSystem
close, getUserPrincipalLookupService, isOpen, supportedFileAttributeViews
-
Field Details
-
log
protected final org.slf4j.Logger log -
fileSystemProvider
-
-
Constructor Details
-
BaseFileSystem
-
-
Method Details
-
getDefaultDir
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin classFileSystem
-
provider
- Specified by:
providerin classFileSystem
-
getSeparator
- Specified by:
getSeparatorin classFileSystem
-
getRootDirectories
- Specified by:
getRootDirectoriesin classFileSystem
-
getFileStores
- Specified by:
getFileStoresin classFileSystem
-
getPath
- Specified by:
getPathin classFileSystem
-
appendDedupSep
-
handleWindowsSeparator
In case we are running on Windows, accept "\\" as a file separator. Ignore in *nix as "\\" is a valid filename- Parameters:
name- the name to fix the separator for if running on Windows- Returns:
- the fixed name
-
hostFsHasWindowsSeparator
protected boolean hostFsHasWindowsSeparator() -
getPathMatcher
- Specified by:
getPathMatcherin classFileSystem
-
globToRegex
-
newWatchService
- Specified by:
newWatchServicein classFileSystem- Throws:
IOException
-
create
-
create
-
create
-