Package com.google.common.jimfs
Class UnixPathType
- java.lang.Object
-
- com.google.common.jimfs.PathType
-
- com.google.common.jimfs.UnixPathType
-
final class UnixPathType extends PathType
Unix-style path type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.jimfs.PathType
PathType.ParseResult
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUnixPathType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidcheckValid(java.lang.String path)PathType.ParseResultparsePath(java.lang.String path)Parses the given strings as a path.PathType.ParseResultparseUriPath(java.lang.String uriPath)Parses a path from the given URI path.java.lang.StringtoString(@Nullable java.lang.String root, java.lang.Iterable<java.lang.String> names)Returns the string form of the given path.java.lang.StringtoUriPath(java.lang.String root, java.lang.Iterable<java.lang.String> names, boolean directory)Returns the string form of the given path for use in the path part of a URI.-
Methods inherited from class com.google.common.jimfs.PathType
allowsMultipleRoots, emptyPath, fromUri, getOtherSeparators, getSeparator, joiner, splitter, toString, toUri, unix, windows
-
-
-
-
Field Detail
-
INSTANCE
static final PathType INSTANCE
Unix path type.
-
-
Method Detail
-
parsePath
public PathType.ParseResult parsePath(java.lang.String path)
Description copied from class:PathTypeParses the given strings as a path.
-
checkValid
private static void checkValid(java.lang.String path)
-
toString
public java.lang.String toString(@Nullable java.lang.String root, java.lang.Iterable<java.lang.String> names)Description copied from class:PathTypeReturns the string form of the given path.
-
toUriPath
public java.lang.String toUriPath(java.lang.String root, java.lang.Iterable<java.lang.String> names, boolean directory)Description copied from class:PathTypeReturns the string form of the given path for use in the path part of a URI. The root element is not nullable as the path must be absolute. The elements of the returned path do not need to be escaped. Thedirectoryboolean indicates whether the file the URI is for is known to be a directory.
-
parseUriPath
public PathType.ParseResult parseUriPath(java.lang.String uriPath)
Description copied from class:PathTypeParses a path from the given URI path.- Specified by:
parseUriPathin classPathType
-
-