commit
bb87dcdb5e
|
@ -68,6 +68,12 @@ define(function(require) {
|
||||||
|
|
||||||
SUPER_NODE_ID: '00000000-0000-0000-0000-000000000000',
|
SUPER_NODE_ID: '00000000-0000-0000-0000-000000000000',
|
||||||
|
|
||||||
|
//Reserved FileDescriptors for streams
|
||||||
|
STDIN: 0,
|
||||||
|
STDOUT: 1,
|
||||||
|
STDERR: 2,
|
||||||
|
FIRST_DESCRIPTOR: 3,
|
||||||
|
|
||||||
ENVIRONMENT: {
|
ENVIRONMENT: {
|
||||||
TMP: '/tmp',
|
TMP: '/tmp',
|
||||||
PATH: ''
|
PATH: ''
|
||||||
|
|
|
@ -19,6 +19,11 @@ define(function(require) {
|
||||||
var FSWatcher = require('src/fs-watcher');
|
var FSWatcher = require('src/fs-watcher');
|
||||||
var Errors = require('src/errors');
|
var Errors = require('src/errors');
|
||||||
|
|
||||||
|
var STDIN = require('src/constants').STDIN;
|
||||||
|
var STDOUT = require('src/constants').STDOUT;
|
||||||
|
var STDERR = require('src/constants').STDERR;
|
||||||
|
var FD = require('src/constants').FIRST_DESCRIPTOR;
|
||||||
|
|
||||||
// The core fs operations live on impl
|
// The core fs operations live on impl
|
||||||
var impl = require('src/filesystem/implementation');
|
var impl = require('src/filesystem/implementation');
|
||||||
|
|
||||||
|
@ -74,10 +79,15 @@ define(function(require) {
|
||||||
fs.name = name;
|
fs.name = name;
|
||||||
fs.error = null;
|
fs.error = null;
|
||||||
|
|
||||||
|
fs.stdin = STDIN;
|
||||||
|
fs.stdout = STDOUT;
|
||||||
|
fs.stderr = STDERR;
|
||||||
|
fs.firstFD = FD;
|
||||||
|
|
||||||
// Safely expose the list of open files and file
|
// Safely expose the list of open files and file
|
||||||
// descriptor management functions
|
// descriptor management functions
|
||||||
var openFiles = {};
|
var openFiles = {};
|
||||||
var nextDescriptor = 1;
|
var nextDescriptor = 3;
|
||||||
Object.defineProperty(this, "openFiles", {
|
Object.defineProperty(this, "openFiles", {
|
||||||
get: function() { return openFiles; }
|
get: function() { return openFiles; }
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue