
- Node.js - Home
- Node.js - Introduction
- Node.js - Environment Setup
- Node.js - First Application
- Node.js - REPL Terminal
- Node.js - Command Line Options
- Node.js - Package Manager (NPM)
- Node.js - Callbacks Concept
- Node.js - Upload Files
- Node.js - Send an Email
- Node.js - Events
- Node.js - Event Loop
- Node.js - Event Emitter
- Node.js - Debugger
- Node.js - Global Objects
- Node.js - Console
- Node.js - Process
- Node.js - Scaling Application
- Node.js - Packaging
- Node.js - Express Framework
- Node.js - RESTFul API
- Node.js - Buffers
- Node.js - Streams
- Node.js - File System
- Node.js MySQL
- Node.js - MySQL Get Started
- Node.js - MySQL Create Database
- Node.js - MySQL Create Table
- Node.js - MySQL Insert Into
- Node.js - MySQL Select From
- Node.js - MySQL Where
- Node.js - MySQL Order By
- Node.js - MySQL Delete
- Node.js - MySQL Update
- Node.js - MySQL Join
- Node.js MongoDB
- Node.js - MongoDB Get Started
- Node.js - MongoDB Create Database
- Node.js - MongoDB Create Collection
- Node.js - MongoDB Insert
- Node.js - MongoDB Find
- Node.js - MongoDB Query
- Node.js - MongoDB Sort
- Node.js - MongoDB Delete
- Node.js - MongoDB Update
- Node.js - MongoDB Limit
- Node.js - MongoDB Join
- Node.js Modules
- Node.js - Modules
- Node.js - Built-in Modules
- Node.js - Utility Modules
- Node.js - Web Module
Node.js - Path module
The Path module of Node.js offers utilities for working with file and directory paths. Depending on the type of operating system − POSIX or WINDOWS, the methods given in the Path module may yield varying results.
List of Methods
Following is a list of methods available in the Path Module −
Sr.No | Module & Description |
---|---|
1 |
This function allows you to retrieve last portion of a specified path. |
2 |
It is a platform-specific property, it represents the delimiter (separator) used to separate the file paths in the environment variable named PATH of the current operating system. |
3 |
This method is used to retrieve the parent directory for a specified path. |
4 |
Used to get the extension of the given file, based on the last occurrence of the (.) period character in the path. |
5 |
This method accepts an object representing a path and returns the given path in the string format. |
6 |
It will return a Boolean value, which is used to determine whether the given path is absolute or not. |
7 |
Used to join all the given string path segments together by using the platform separator. |
8 |
It is used to normalize the given path. |
9 |
It returns an object whose properties represent significant elements of a path. |
10 |
It is used to retrieve a relative path from one path to another path based on current working directory. |
11 |
It is used to rectify a series of path segments or paths to an absolute path. |
12 |
It returns an equivalent namespace-prefixed path for the given path. |