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 FileSystemProvider
protected final org.slf4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected T
protected T
create
(String root, Collection<String> names) protected abstract T
getPathMatcher
(String syntaxAndPattern) protected String
globToRegex
(String pattern) protected String
handleWindowsSeparator
(String name) In case we are running on Windows, accept "\\" as a file separator.protected boolean
boolean
provider()
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:
isReadOnly
in classFileSystem
-
provider
- Specified by:
provider
in classFileSystem
-
getSeparator
- Specified by:
getSeparator
in classFileSystem
-
getRootDirectories
- Specified by:
getRootDirectories
in classFileSystem
-
getFileStores
- Specified by:
getFileStores
in classFileSystem
-
getPath
- Specified by:
getPath
in 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:
getPathMatcher
in classFileSystem
-
globToRegex
-
newWatchService
- Specified by:
newWatchService
in classFileSystem
- Throws:
IOException
-
create
-
create
-
create
-