public abstract class BaseFileSystem<T extends Path> extends FileSystem
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
BaseFileSystem(FileSystemProvider fileSystemProvider) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendDedupSep(StringBuilder sb,
CharSequence s) |
protected T |
create(String root,
Collection<String> names) |
protected abstract T |
create(String root,
List<String> names) |
protected T |
create(String root,
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) |
protected String |
handleWindowsSeparator(String name)
In case we are running on Windows, accept "\\" as a file separator.
|
protected boolean |
hostFsHasWindowsSeparator() |
boolean |
isReadOnly() |
WatchService |
newWatchService() |
FileSystemProvider |
provider() |
close, getUserPrincipalLookupService, isOpen, supportedFileAttributeViews
protected BaseFileSystem(FileSystemProvider fileSystemProvider)
public T getDefaultDir()
public boolean isReadOnly()
isReadOnly
in class FileSystem
public FileSystemProvider provider()
provider
in class FileSystem
public String getSeparator()
getSeparator
in class FileSystem
public Iterable<Path> getRootDirectories()
getRootDirectories
in class FileSystem
public Iterable<FileStore> getFileStores()
getFileStores
in class FileSystem
public T getPath(String first, String... more)
getPath
in class FileSystem
protected void appendDedupSep(StringBuilder sb, CharSequence s)
protected String handleWindowsSeparator(String name)
name
- the name to fix the separator for if running on Windowsprotected boolean hostFsHasWindowsSeparator()
public PathMatcher getPathMatcher(String syntaxAndPattern)
getPathMatcher
in class FileSystem
public WatchService newWatchService() throws IOException
newWatchService
in class FileSystem
IOException
protected T create(String root, Collection<String> names)
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.