Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
enable missing fs functions on windows
  • Loading branch information
Igor Zinkovsky authored and ry committed Sep 4, 2011
1 parent ee048aa commit a3d7782
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/node_file.cc
Expand Up @@ -339,7 +339,6 @@ static Handle<Value> Stat(const Arguments& args) {
}
}

#ifdef __POSIX__
static Handle<Value> LStat(const Arguments& args) {
HandleScope scope;

Expand All @@ -356,7 +355,6 @@ static Handle<Value> LStat(const Arguments& args) {
return scope.Close(BuildStatsObject((NODE_STAT_STRUCT*)SYNC_REQ.ptr));
}
}
#endif // __POSIX__

static Handle<Value> FStat(const Arguments& args) {
HandleScope scope;
Expand Down Expand Up @@ -807,7 +805,6 @@ static Handle<Value> Chmod(const Arguments& args) {
}


#ifdef __POSIX__
/* fs.fchmod(fd, mode);
* Wrapper for fchmod(1) / EIO_FCHMOD
*/
Expand All @@ -827,10 +824,8 @@ static Handle<Value> FChmod(const Arguments& args) {
return Undefined();
}
}
#endif // __POSIX__


#ifdef __POSIX__
/* fs.chown(path, uid, gid);
* Wrapper for chown(1) / EIO_CHOWN
*/
Expand All @@ -856,10 +851,8 @@ static Handle<Value> Chown(const Arguments& args) {
return Undefined();
}
}
#endif // __POSIX__


#ifdef __POSIX__
/* fs.fchown(fd, uid, gid);
* Wrapper for fchown(1) / EIO_FCHOWN
*/
Expand All @@ -885,7 +878,7 @@ static Handle<Value> FChown(const Arguments& args) {
return Undefined();
}
}
#endif // __POSIX__


static Handle<Value> UTimes(const Arguments& args) {
HandleScope scope;
Expand Down Expand Up @@ -949,9 +942,7 @@ void File::Initialize(Handle<Object> target) {
NODE_SET_METHOD(target, "sendfile", SendFile);
NODE_SET_METHOD(target, "readdir", ReadDir);
NODE_SET_METHOD(target, "stat", Stat);
#ifdef __POSIX__
NODE_SET_METHOD(target, "lstat", LStat);
#endif // __POSIX__
NODE_SET_METHOD(target, "fstat", FStat);
#ifdef __POSIX__
NODE_SET_METHOD(target, "link", Link);
Expand All @@ -962,15 +953,13 @@ void File::Initialize(Handle<Object> target) {
NODE_SET_METHOD(target, "write", Write);

NODE_SET_METHOD(target, "chmod", Chmod);
#ifdef __POSIX__
NODE_SET_METHOD(target, "fchmod", FChmod);
//NODE_SET_METHOD(target, "lchmod", LChmod);

NODE_SET_METHOD(target, "chown", Chown);
NODE_SET_METHOD(target, "fchown", FChown);
//NODE_SET_METHOD(target, "lchown", LChown);

#endif // __POSIX__
NODE_SET_METHOD(target, "utimes", UTimes);
NODE_SET_METHOD(target, "futimes", FUTimes);

Expand Down

0 comments on commit a3d7782

Please sign in to comment.