The path
module provides utilities for working with file and directory paths.
Goal of this inerface is to be compatible with Node.js Path API
Compatibility objective : 100%
To use this module:
const path = require('path');
Get the the extension of the path, from the last occurrence of the .
Alias for path.extension(path)
Get the directory name of a path, similar to the Unix dirname command.
path.dirname('/tmp/dir1/dir2');
// Returns: '/tmp/dir1'
A TypeError
is thrown if path is not a string.
<string>
Path of the file to check<boolean>
true
if the path is absolute false
otherwiseDetermine if path is an absolute path
Resolve path segments into aboslute path.