public abstract class AbstractPath<FS extends FileSystem> extends Object implements Path, AttrHolder
Modifier and Type | Class and Description |
---|---|
static class |
AbstractPath.RootInfo |
Modifier and Type | Field and Description |
---|---|
protected AttrsStorage |
attrsStorage |
static String |
DEFAULT_WINDOWS_DRIVER |
protected File |
file |
protected FS |
fs |
protected String |
host |
protected boolean |
isAbsolute |
protected boolean |
isNormalized |
protected boolean |
isRealPath |
protected boolean |
isRoot |
protected List<org.uberfire.commons.data.Pair<Integer,Integer>> |
offsets |
protected byte[] |
path |
protected String |
toStringFormat |
protected boolean |
usesWindowsFormat |
static Pattern |
WINDOWS_DRIVER |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPath(FS fs,
File file) |
protected |
AbstractPath(FS fs,
String path,
String host,
boolean isRoot,
boolean isRealPath,
boolean isNormalized) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final Pattern WINDOWS_DRIVER
public static final String DEFAULT_WINDOWS_DRIVER
protected final FS extends FileSystem fs
protected final boolean usesWindowsFormat
protected final boolean isAbsolute
protected final byte[] path
protected final boolean isRoot
protected final boolean isRealPath
protected final boolean isNormalized
protected final String host
protected final AttrsStorage attrsStorage
protected String toStringFormat
protected File file
protected abstract Path newPath(FS fs, String substring, String host, boolean realPath, boolean isNormalized)
protected abstract AbstractPath.RootInfo setupRoot(FS fs, String path, String host, boolean isRoot)
public FS getFileSystem()
getFileSystem
in interface Path
public boolean isAbsolute()
isAbsolute
in interface Path
public Path getFileName()
getFileName
in interface Path
public int getNameCount()
getNameCount
in interface Path
public Path getName(int index) throws IllegalArgumentException
getName
in interface Path
IllegalArgumentException
public Path subpath(int beginIndex, int endIndex) throws IllegalArgumentException
subpath
in interface Path
IllegalArgumentException
public URI toUri() throws IOException, SecurityException
toUri
in interface Path
IOException
SecurityException
public Path toAbsolutePath() throws IOException, SecurityException
toAbsolutePath
in interface Path
IOException
SecurityException
protected abstract String defaultDirectory()
public Path toRealPath(LinkOption... options) throws IOException, SecurityException
toRealPath
in interface Path
IOException
SecurityException
public boolean startsWith(Path other)
startsWith
in interface Path
public boolean startsWith(String other) throws InvalidPathException
startsWith
in interface Path
InvalidPathException
public boolean endsWith(String other) throws InvalidPathException
endsWith
in interface Path
InvalidPathException
public Path resolve(String other) throws InvalidPathException
resolve
in interface Path
InvalidPathException
public Path resolveSibling(Path other)
resolveSibling
in interface Path
public Path resolveSibling(String other) throws InvalidPathException
resolveSibling
in interface Path
InvalidPathException
public Path relativize(Path otherx) throws IllegalArgumentException
relativize
in interface Path
IllegalArgumentException
public int compareTo(Path other)
compareTo
in interface Comparable<Path>
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws UnsupportedOperationException, IllegalArgumentException, ClosedWatchServiceException, IOException, SecurityException
register
in interface Watchable
UnsupportedOperationException
IllegalArgumentException
ClosedWatchServiceException
IOException
SecurityException
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws UnsupportedOperationException, IllegalArgumentException, ClosedWatchServiceException, IOException, SecurityException
register
in interface Watchable
UnsupportedOperationException
IllegalArgumentException
ClosedWatchServiceException
IOException
SecurityException
public String toString(boolean addHost)
public void clearCache()
public String getHost()
public boolean isRealPath()
public AttrsStorage getAttrStorage()
getAttrStorage
in interface AttrHolder
public <V extends AttributeView> void addAttrView(V view)
addAttrView
in interface AttrHolder
public <V extends AttributeView> V getAttrView(Class<V> type)
getAttrView
in interface AttrHolder
public <V extends AttributeView> V getAttrView(String name)
getAttrView
in interface AttrHolder
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.