码迷,mamicode.com
首页 > Web开发 > 详细

nodeJS文件路径总结

时间:2015-11-11 01:12:03      阅读:401      评论:0      收藏:0      [点我收藏+]

标签:

文件夹目录
F:
* test1
* tes2
* test3
* test4
* a.html
*
//例句
fs.readFile(‘../../../a.html‘, function (err, html) {} }
var a = require(‘./a‘)
* _ (不加反斜杠) ‘a.html‘ F:\test\test1\test2\test3\test4\a.html
* / 根目录 ‘/a.html‘ F:/a.html
* ./ 当前这一级目录 ‘./a.html‘ F:\test\test1\test2\test3\test4\a.html
* ../ 上上级目录 ‘../a.html‘ F:\test\test1\test2\test3\a.html
* .../ 等同于 ‘.../a.html‘ F:\test\test1\test2\test3\test4\...\a.html
* ./../ ‘./../a.html‘ F:\test\test1\test2\test3\a.html
* ../../ ‘../../a.html‘ F:\test\test1\test2\a.html
* ../../../ ‘../../../a.html‘ F:\test\test1\a.html

nodeJS文件路径总结

标签:

原文地址:http://www.cnblogs.com/xuange306/p/4954999.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!