public final class Exports extends Objs
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier and Type | Field and Description |
---|---|
static Objs.Property<String> |
delimiter |
static Objs.Property<String> |
sep |
Modifier and Type | Method and Description |
---|---|
static String |
basename(String p)
Return the last portion of a path.
|
static String |
basename(String p,
String ext)
Return the last portion of a path.
|
static String |
dirname(String p)
Return the directory name of a path.
|
static String |
extname(String p)
Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
static String |
format(ParsedPath pathObject)
Returns a path string from an object - the opposite of parse().
|
static Boolean |
isAbsolute(String path)
Determines whether {path} is an absolute path.
|
static String |
join(Object... paths)
Join all arguments together and normalize the resulting path.
|
static String |
join(String... paths)
Join all arguments together and normalize the resulting path.
|
static String |
normalize(String p)
Normalize a string path, reducing '..' and '.' parts.
|
static ParsedPath |
parse(String pathString)
Returns an object from a path string - the opposite of format().
|
static String |
relative(String from,
String to)
Solve the relative path from {from} to {to}.
|
static String |
resolve(Object... pathSegments)
The right-most parameter is considered {to}.
|
$as, $as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOf
public static Objs.Property<String> sep
public static Objs.Property<String> delimiter
public static String basename(String p, String ext)
p
- the path to evaluate.ext
- optionally, an extension to remove from the result.public static String basename(String p)
p
- the path to evaluate.ext
- optionally, an extension to remove from the result.public static String dirname(String p)
p
- the path to evaluate.public static String extname(String p)
p
- the path to evaluate.public static String format(ParsedPath pathObject)
pathString
- path to evaluate.public static Boolean isAbsolute(String path)
path
- path to test.public static String join(Object... paths)
paths
- string paths to join.public static String join(String... paths)
paths
- string paths to join.public static String normalize(String p)
p
- string path to normalize.public static ParsedPath parse(String pathString)
pathString
- path to evaluate.public static String relative(String from, String to)
from
- to
- public static String resolve(Object... pathSegments)
pathSegments
- string paths to join. Non-string arguments are ignored.Copyright © 2018. All rights reserved.