Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs path

const path = require('path');

path.parse('/home/user/dir/file.txt');
// Returns:
// { root: '/',
//   dir: '/home/user/dir',
//   base: 'file.txt',
//   ext: '.txt',
//   name: 'file' }
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #nodejs #path
ADD COMMENT
Topic
Name
1+6 =