
net.java.html.lib.node.path.Exports Maven / Gradle / Ivy
The newest version!
package net.java.html.lib.node.path;
@java.lang.SuppressWarnings("unchecked")
public final class Exports extends net.java.html.lib.Objs {
private Exports() {
}
private static net.java.html.lib.Objs selfModule() {
return net.java.html.lib.Modules.find("path");
}
/**
* Return the last portion of a path. Similar to the Unix basename command.
* Often used to extract the file name from a fully qualified path.
*
* @param p the path to evaluate.
* @param ext optionally, an extension to remove from the result.
*/
public static java.lang.String basename(java.lang.String p, java.lang.String ext) {
return $Typings$.basename$1($js(selfModule()), p, ext);
}
/**
* Return the last portion of a path. Similar to the Unix basename command.
* Often used to extract the file name from a fully qualified path.
*
* @param p the path to evaluate.
* @param ext optionally, an extension to remove from the result.
*/
public static java.lang.String basename(java.lang.String p) {
return $Typings$.basename$2($js(selfModule()), p);
}
/**
* Return the directory name of a path. Similar to the Unix dirname command.
*
* @param p the path to evaluate.
*/
public static java.lang.String dirname(java.lang.String p) {
return $Typings$.dirname$3($js(selfModule()), p);
}
/**
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
*
* @param p the path to evaluate.
*/
public static java.lang.String extname(java.lang.String p) {
return $Typings$.extname$4($js(selfModule()), p);
}
/**
* Returns a path string from an object - the opposite of parse().
*
* @param pathString path to evaluate.
*/
public static java.lang.String format(net.java.html.lib.node.path.ParsedPath pathObject) {
return $Typings$.format$5($js(selfModule()), /* FirstTypeNode*/$js(pathObject));
}
/**
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
*
* @param path path to test.
*/
public static java.lang.Boolean isAbsolute(java.lang.String path) {
return $Typings$.isAbsolute$6($js(selfModule()), path);
}
/**
* Join all arguments together and normalize the resulting path.
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
*
* @param paths string paths to join.
*/
public static java.lang.String join(java.lang.Object... paths) {
return $Typings$.join$7($js(selfModule()), /* ArrayType*/$js(paths));
}
/**
* Join all arguments together and normalize the resulting path.
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
*
* @param paths string paths to join.
*/
public static java.lang.String join(java.lang.String... paths) {
return $Typings$.join$8($js(selfModule()), /* ArrayType*/$js(paths));
}
/**
* Normalize a string path, reducing '..' and '.' parts.
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
*
* @param p string path to normalize.
*/
public static java.lang.String normalize(java.lang.String p) {
return $Typings$.normalize$9($js(selfModule()), p);
}
/**
* Returns an object from a path string - the opposite of format().
*
* @param pathString path to evaluate.
*/
public static net.java.html.lib.node.path.ParsedPath parse(java.lang.String pathString) {
return (net.java.html.lib.node.path.ParsedPath)net.java.html.lib.node.path.ParsedPath.$as($Typings$.parse$10($js(selfModule()), pathString));
}
/**
* Solve the relative path from {from} to {to}.
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
*
* @param from
* @param to
*/
public static java.lang.String relative(java.lang.String from, java.lang.String to) {
return $Typings$.relative$11($js(selfModule()), from, to);
}
/**
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
*
* Starting from leftmost {from} paramter, resolves {to} to an absolute path.
*
* If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
*
* @param pathSegments string paths to join. Non-string arguments are ignored.
*/
public static java.lang.String resolve(java.lang.Object... pathSegments) {
return $Typings$.resolve$12($js(selfModule()), /* ArrayType*/$js(pathSegments));
}
public static net.java.html.lib.Objs.Property sep = net.java.html.lib.Objs.Property.create(selfModule(), java.lang.String.class, "sep");
public static net.java.html.lib.Objs.Property delimiter = net.java.html.lib.Objs.Property.create(selfModule(), java.lang.String.class, "delimiter");
/* already generated sep */
/* already generated delimiter */
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy