nodejs怎么把临时文件存放在指定的文件夹
2016-09-30 · 知道合伙人互联网行家
护肤达人IT宅族
知道合伙人互联网行家
向TA提问 私信TA
知道合伙人互联网行家
采纳数:5637
获赞数:17441
毕业于曲阜师范大学,学士学位。互联网行业2年从业经验,读过SEO相关书籍。现任爱家网SEO优化专员。
向TA提问 私信TA
关注
展开全部
Table of contents
Cross-platform if you want
Paths
Use path.resolve to traverse the filesystem
Use path.normalize to create reliable paths
Use path.join to join folder names
Scripts in package.json
Join shell commands with a double ampersand instead of a semi-colon
Cross Platform Newline Characters
Temporary files
Home directories
Use the os module for more control
Conclusion
References
Cross-platform if you want
Node.js is cross-platform meaning it works on Windows, OSX and Linux. A large number of the Node.js community write Node.js on OSX and then deploy to Linux servers. Because OSX and Linux are based on UNIX this tends to just work. Windows support is a first-class citizen in Node.js and if you learn to use Node.js in the right way you can make sure that you can welcome your Windows friends to your code party.
Cross-platform if you want
Paths
Use path.resolve to traverse the filesystem
Use path.normalize to create reliable paths
Use path.join to join folder names
Scripts in package.json
Join shell commands with a double ampersand instead of a semi-colon
Cross Platform Newline Characters
Temporary files
Home directories
Use the os module for more control
Conclusion
References
Cross-platform if you want
Node.js is cross-platform meaning it works on Windows, OSX and Linux. A large number of the Node.js community write Node.js on OSX and then deploy to Linux servers. Because OSX and Linux are based on UNIX this tends to just work. Windows support is a first-class citizen in Node.js and if you learn to use Node.js in the right way you can make sure that you can welcome your Windows friends to your code party.
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询