Redirect process.binding('natives').fs to global fs object
This commit is contained in:
parent
0a393eaa1c
commit
afd6f41e08
2 changed files with 6 additions and 1 deletions
|
@ -2,7 +2,7 @@ vm = require 'vm'
|
|||
|
||||
# Execute the 'fs.js' and pass the 'exports' to it.
|
||||
source = '(function (exports, require, module, __filename, __dirname) { ' +
|
||||
process.binding('natives').fs +
|
||||
process.binding('natives').originalFs +
|
||||
'\n});'
|
||||
fn = vm.runInThisContext source, { filename: 'fs.js' }
|
||||
fn exports, require, module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue