Node.js ट्यूटोरियल

Node.js होम Node.js परिचय Node.js प्रारंभ करें Node.js मॉड्यूल Node.js HTTP मॉड्यूल Node.js फ़ाइल सिस्टम Node.js URL मॉड्यूल Node.js एनपीएम Node.js घटनाएँ Node.js फ़ाइलें अपलोड करें Node.js ईमेल

Node.js MySQL

MySQL प्रारंभ करें MySQL डेटाबेस बनाएँ MySQL तालिका बनाएँ MySQL सम्मिलित करें MySQL से चुनें MySQL कहाँ MySQL ऑर्डर बाय MySQL हटाएं MySQL ड्रॉप टेबल MySQL अद्यतन MySQL सीमा मायएसक्यूएल जॉइन

Node.js MongoDB

मोंगोडीबी आरंभ करें MongoDB डेटाबेस बनाएँ MongoDB संग्रह बनाएँ मोंगोडीबी डालें मोंगोडीबी खोजें मोंगोडीबी क्वेरी मोंगोडीबी सॉर्ट मोंगोडीबी हटाएं MongoDB ड्रॉप संग्रह मोंगोडीबी अपडेट मोंगोडीबी सीमा मोंगोडीबी शामिल हों

रास्पबेरी पाई

रासपी आरंभ करें रासपी जीपीआईओ परिचय रासपी ब्लिंकिंग एलईडी रासपी एलईडी और पुशबटन रासपी बहने वाली एल ई डी रासपी वेबसाकेट रासपी आरजीबी एलईडी वेबसाकेट रास्पी अवयव

Node.js संदर्भ

अंतर्निहित मॉड्यूल

Node.js पथ मॉड्यूल

अंतर्निहित मॉड्यूल


उदाहरण

फ़ाइल पथ से फ़ाइल नाम निकालें:

var path = require('path');
var filename = path.basename('/Users/Refsnes/demo_path.js');
console.log(filename);

परिभाषा और उपयोग

पथ मॉड्यूल निर्देशिकाओं और फ़ाइल पथों के साथ काम करने का एक तरीका प्रदान करता है।


वाक्य - विन्यास

आपके आवेदन में पथ मॉड्यूल को शामिल करने का सिंटैक्स:

var path = require('path');

पथ गुण और तरीके

Method Description
basename() Returns the last part of a path
delimiter Returns the delimiter specified for the platform
dirname() Returns the directories of a path
extname() Returns the file extension of a path
format() Formats a path object into a path string
isAbsolute() Returns true if a path is an absolute path, otherwise false
join() Joins the specified paths into one
normalize() Normalizes the specified path
parse() Formats a path string into a path object
posix Returns an object containing POSIX specific properties and methods
relative() Returns the relative path from one specified path to another specified path
resolve() Resolves the specified paths into an absolute path
sep Returns the segment separator specified for the platform
win32 Returns an object containing Windows specific properties and methods

अंतर्निहित मॉड्यूल