node/deps/npm/node_modules/graceful-fs/fs.js

12 lines
378 B
JavaScript
Raw Normal View History

2014-08-01 00:05:30 +08:00
// eeeeeevvvvviiiiiiillllll
// more evil than monkey-patching the native builtin?
// Not sure.
var mod = require("module")
var pre = '(function (exports, require, module, __filename, __dirname) { '
var post = '});'
var src = pre + process.binding('natives').fs + post
var vm = require('vm')
var fn = vm.runInThisContext(src)
fn(exports, require, module, __filename, __dirname)