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, supportedFileAttributeViewsprotected BaseFileSystem(FileSystemProvider fileSystemProvider)
public T getDefaultDir()
public boolean isReadOnly()
isReadOnly in class FileSystempublic FileSystemProvider provider()
provider in class FileSystempublic String getSeparator()
getSeparator in class FileSystempublic Iterable<Path> getRootDirectories()
getRootDirectories in class FileSystempublic Iterable<FileStore> getFileStores()
getFileStores in class FileSystempublic T getPath(String first, String... more)
getPath in class FileSystemprotected 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 FileSystempublic WatchService newWatchService() throws IOException
newWatchService in class FileSystemIOExceptionprotected T create(String root, Collection<String> names)
Copyright © 2018–2024 The Apache Software Foundation. All rights reserved.