Node path
The path module provides utilities for working with file paths.
Example
const os = require("os");
const path = require("path");
const myDocuments = path.join(os.homedir(), "Documents");
Constants
Constants |
Description |
path.delimiter |
OS-specific path delimiter (as for a list of paths) |
path.sep |
OS-specific path separator |
Functions
Function Name |
Description |
path.basename |
|
path.dirname |
|
path.extname |
|
path.format |
|
path.isAbsolute |
|
path.join |
|
path.normalize |
|
path.parse |
|
path.relative |
|
path.resolve |
|
path.toNamespacedPath |
|
