Node.js 的文件限制 fs-lock

码农软件 · 软件分类 · 服务器端JavaScript · 2019-04-13 16:28:08

软件介绍

fs-lock 是 Node.js的文件限制,用纯 JavaScript 写成,用户可以加载其他方法获取访问。

示例代码:

//Do your startup code here, then lock it down with:
require('fs-lock')({    
'file_accessdir': [ __dirname, '/tmp' ],    
'open_basedir': [ '/usr/local/share/node_modules', __dirname ]
});var fs = require('fs');

fs.readFile('/etc/passwd', function(err, data) {    
//this will throw an Access Denied error});

本文地址:https://codercto.com/soft/d/3502.html

The Starfish and the Spider

The Starfish and the Spider

Ori Brafman、Rod A. Beckstrom / Portfolio Hardcover / 2006-10-05 / USD 24.95

Understanding the amazing force that links some of today's most successful companies If you cut off a spider's leg, it's crippled; if you cut off its head, it dies. But if you cut off a st......一起来看看 《The Starfish and the Spider》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码