@@ -12,7 +12,7 @@ node.fs.cat = function (path, encoding, callback) {
12
12
callback ( - 1 ) ;
13
13
} ;
14
14
15
- var content = ( encoding == node . constants . UTF8 ? "" : [ ] ) ;
15
+ var content = ( encoding == node . UTF8 ? "" : [ ] ) ;
16
16
var pos = 0 ;
17
17
var chunkSize = 16 * 1024 ;
18
18
@@ -41,9 +41,9 @@ node.fs.File = function (options) {
41
41
options = options || { } ;
42
42
43
43
if ( options . encoding === "utf8" ) {
44
- self . encoding = node . constants . UTF8 ;
44
+ self . encoding = node . UTF8 ;
45
45
} else {
46
- self . encoding = node . constants . RAW ;
46
+ self . encoding = node . RAW ;
47
47
}
48
48
49
49
//node.debug("encoding: opts=" + options.encoding + " self=" + self.encoding);
@@ -104,22 +104,22 @@ node.fs.File = function (options) {
104
104
var flags ;
105
105
switch ( mode ) {
106
106
case "r" :
107
- flags = node . constants . O_RDONLY ;
107
+ flags = node . O_RDONLY ;
108
108
break ;
109
109
case "r+" :
110
- flags = node . constants . O_RDWR ;
110
+ flags = node . O_RDWR ;
111
111
break ;
112
112
case "w" :
113
- flags = node . constants . O_CREAT | node . constants . O_TRUNC | node . constants . O_WRONLY ;
113
+ flags = node . O_CREAT | node . O_TRUNC | node . O_WRONLY ;
114
114
break ;
115
115
case "w+" :
116
- flags = node . constants . O_CREAT | node . constants . O_TRUNC | node . constants . O_RDWR ;
116
+ flags = node . O_CREAT | node . O_TRUNC | node . O_RDWR ;
117
117
break ;
118
118
case "a" :
119
- flags = node . constants . O_APPEND | node . constants . O_CREAT | node . constants . O_WRONLY ;
119
+ flags = node . O_APPEND | node . O_CREAT | node . O_WRONLY ;
120
120
break ;
121
121
case "a+" :
122
- flags = node . constants . O_APPEND | node . constants . O_CREAT | node . constants . O_RDWR ;
122
+ flags = node . O_APPEND | node . O_CREAT | node . O_RDWR ;
123
123
break ;
124
124
default :
125
125
throw "Unknown mode" ;
@@ -173,9 +173,9 @@ node.fs.File = function (options) {
173
173
} ;
174
174
} ;
175
175
176
- stdout = new node . fs . File ( { fd : node . constants . STDOUT_FILENO } ) ;
177
- stderr = new node . fs . File ( { fd : node . constants . STDERR_FILENO } ) ;
178
- stdin = new node . fs . File ( { fd : node . constants . STDIN_FILENO } ) ;
176
+ stdout = new node . fs . File ( { fd : node . STDOUT_FILENO } ) ;
177
+ stderr = new node . fs . File ( { fd : node . STDERR_FILENO } ) ;
178
+ stdin = new node . fs . File ( { fd : node . STDIN_FILENO } ) ;
179
179
180
180
puts = stdout . puts ;
181
181
print = stdout . print ;
0 commit comments