The goog.string.path Namespace

.basename(path)

Returns the final component of a pathname. See http://docs.python.org/library/os.path.html#os.path.basename

path {string}
A pathname.
returns {string}
path The final component of a pathname, i.e. everything after the final slash.

.dirname(path)

Returns the directory component of a pathname. See http://docs.python.org/library/os.path.html#os.path.dirname

path {string}
A pathname.
returns {string}
The directory component of a pathname, i.e. everything leading up to the final slash.

.join(var_args)

Joins one or more path components (e.g. 'foo/' and 'bar' make 'foo/bar'). An absolute component will discard all previous component. See http://docs.python.org/library/os.path.html#os.path.join

var_args {...string}
One of more path components.
returns {string}
The path components joined.

.normalizePath(path)

Normalizes a pathname by collapsing duplicate separators, parent directory references ('..'), and current directory references ('.'). See http://docs.python.org/library/os.path.html#os.path.normpath

path {string}
One or more path components.
returns {string}
The path after normalization.

.split(path)

Splits a pathname into "dirname" and "basename" components, where "basename" is everything after the final slash. Either part may return an empty string. See http://docs.python.org/library/os.path.html#os.path.split

path {string}
A pathname.
returns {!Array.<string>}
An array of [dirname, basename].