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 private
UnixPathType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
checkValid(java.lang.String path)
PathType.ParseResult
parsePath(java.lang.String path)
Parses the given strings as a path.PathType.ParseResult
parseUriPath(java.lang.String uriPath)
Parses a path from the given URI path.java.lang.String
toString(@Nullable java.lang.String root, java.lang.Iterable<java.lang.String> names)
Returns the string form of the given path.java.lang.String
toUriPath(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:PathType
Parses 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:PathType
Returns 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:PathType
Returns 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. Thedirectory
boolean 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:PathType
Parses a path from the given URI path.- Specified by:
parseUriPath
in classPathType
-
-