Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node get absolute path

// to get a valid absolute path
resolve = require('path').resolve
resolve('../../bb/tmp.txt')

// to get current file directory
__dirname
 
PREVIOUS NEXT
Tagged: #node #absolute #path
ADD COMMENT
Topic
Name
3+5 =