@@ -59,20 +59,6 @@ static Persistent<String> errno_symbol;
5959static Persistent<String> syscall_symbol;
6060static Persistent<String> errpath_symbol;
6161
62- static Persistent<String> dev_symbol;
63- static Persistent<String> ino_symbol;
64- static Persistent<String> mode_symbol;
65- static Persistent<String> nlink_symbol;
66- static Persistent<String> uid_symbol;
67- static Persistent<String> gid_symbol;
68- static Persistent<String> rdev_symbol;
69- static Persistent<String> size_symbol;
70- static Persistent<String> blksize_symbol;
71- static Persistent<String> blocks_symbol;
72- static Persistent<String> atime_symbol;
73- static Persistent<String> mtime_symbol;
74- static Persistent<String> ctime_symbol;
75-
7662static Persistent<String> rss_symbol;
7763static Persistent<String> vsize_symbol;
7864static Persistent<String> heap_total_symbol;
@@ -907,73 +893,6 @@ ssize_t DecodeWrite(char *buf,
907893 return buflen;
908894}
909895
910- static Persistent<FunctionTemplate> stats_constructor_template;
911-
912- Local<Object> BuildStatsObject (struct stat * s) {
913- HandleScope scope;
914-
915- if (dev_symbol.IsEmpty ()) {
916- dev_symbol = NODE_PSYMBOL (" dev" );
917- ino_symbol = NODE_PSYMBOL (" ino" );
918- mode_symbol = NODE_PSYMBOL (" mode" );
919- nlink_symbol = NODE_PSYMBOL (" nlink" );
920- uid_symbol = NODE_PSYMBOL (" uid" );
921- gid_symbol = NODE_PSYMBOL (" gid" );
922- rdev_symbol = NODE_PSYMBOL (" rdev" );
923- size_symbol = NODE_PSYMBOL (" size" );
924- blksize_symbol = NODE_PSYMBOL (" blksize" );
925- blocks_symbol = NODE_PSYMBOL (" blocks" );
926- atime_symbol = NODE_PSYMBOL (" atime" );
927- mtime_symbol = NODE_PSYMBOL (" mtime" );
928- ctime_symbol = NODE_PSYMBOL (" ctime" );
929- }
930-
931- Local<Object> stats =
932- stats_constructor_template->GetFunction ()->NewInstance ();
933-
934- /* ID of device containing file */
935- stats->Set (dev_symbol, Integer::New (s->st_dev ));
936-
937- /* inode number */
938- stats->Set (ino_symbol, Integer::New (s->st_ino ));
939-
940- /* protection */
941- stats->Set (mode_symbol, Integer::New (s->st_mode ));
942-
943- /* number of hard links */
944- stats->Set (nlink_symbol, Integer::New (s->st_nlink ));
945-
946- /* user ID of owner */
947- stats->Set (uid_symbol, Integer::New (s->st_uid ));
948-
949- /* group ID of owner */
950- stats->Set (gid_symbol, Integer::New (s->st_gid ));
951-
952- /* device ID (if special file) */
953- stats->Set (rdev_symbol, Integer::New (s->st_rdev ));
954-
955- /* total size, in bytes */
956- stats->Set (size_symbol, Number::New (s->st_size ));
957-
958- /* blocksize for filesystem I/O */
959- stats->Set (blksize_symbol, Integer::New (s->st_blksize ));
960-
961- /* number of blocks allocated */
962- stats->Set (blocks_symbol, Integer::New (s->st_blocks ));
963-
964- /* time of last access */
965- stats->Set (atime_symbol, NODE_UNIXTIME_V8 (s->st_atime ));
966-
967- /* time of last modification */
968- stats->Set (mtime_symbol, NODE_UNIXTIME_V8 (s->st_mtime ));
969-
970- /* time of last status change */
971- stats->Set (ctime_symbol, NODE_UNIXTIME_V8 (s->st_ctime ));
972-
973- return scope.Close (stats);
974- }
975-
976-
977896// Extracts a C str from a V8 Utf8Value.
978897const char * ToCString (const v8::String::Utf8Value& value) {
979898 return *value ? *value : " <str conversion failed>" ;
@@ -1586,17 +1505,6 @@ static Handle<Value> Binding(const Arguments& args) {
15861505 exports = Object::New ();
15871506 modp->register_func (exports);
15881507 binding_cache->Set (module , exports);
1589- } else if (!strcmp (*module_v, " fs" )) {
1590- exports = Object::New ();
1591-
1592- // Initialize the stats object
1593- Local<FunctionTemplate> stat_templ = FunctionTemplate::New ();
1594- stats_constructor_template = Persistent<FunctionTemplate>::New (stat_templ);
1595- exports->Set (String::NewSymbol (" Stats" ),
1596- stats_constructor_template->GetFunction ());
1597- StatWatcher::Initialize (exports);
1598- File::Initialize (exports);
1599- binding_cache->Set (module , exports);
16001508 } else if (!strcmp (*module_v, " evals" )) {
16011509 exports = Object::New ();
16021510 node::Context::Initialize (exports);
0 commit comments