mirror of https://github.com/nodejs/node.git
12 lines
378 B
JavaScript
12 lines
378 B
JavaScript
// 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)
|