Namespace: path

util.path

A minimal path module to resolve Unix, Windows and URL paths alike.

Methods

util.path.isAbsolute(path){ boolean }

Tests if the specified path is absolute.

Parameters:
path string

Path to test

Returns:
boolean true if path is absolute

util.path.normalize(path){ string }

Normalizes the specified path.

Parameters:
path string

Path to normalize

Returns:
string Normalized path

util.path.resolve(originPath, includePath, alreadyNormalized){ string }

Resolves the specified include path against the specified origin path.

Parameters:
originPath string

Path to the origin file

includePath string

Include path relative to origin path

alreadyNormalized boolean false optional

true if both paths are already known to be normalized

Returns:
string Path to the include file