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.

Name Type Description
path string

Path to test

Returns:
Type Description
boolean true if path is absolute

util.path.normalize(path){ string }

Normalizes the specified path.

Name Type Description
path string

Path to normalize

Returns:
Type Description
string Normalized path

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

Resolves the specified include path against the specified origin path.

Name Type Default Description
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:
Type Description
string Path to the include file