Nodejs-Built-in-OS-Path-Modules

Node js had some built in modules, they are
  • OS Modules
  • Path Modules
  • FS Modules
  • HTTP Modules
  • etc

OS Modules : 

The π—Όπ˜€ module provides operating system-related utility methods and properties. It can be accessed using:

const os = require('os');

console.log(os.type());
console.log(os.version());

console.log(os.freemem());
console.log(os.cpus()); To output the , current file and folder details , find out this modules..

console.log(__dirname);
console.log(__filename); Path Module..

What is the Path module in node?

From the node js docs, The path module provides utilities for working with file and directory paths. It can be accessed using. Yes, a module that will ease your life when working with files and directories.

const path = require('path');

console.log(path.dirname(__filename));
console.log(path.basename(__filename));
console.log(path.extname(__filename));

console.log(path.parse(__filename));