75 Commits
Author SHA1 Message Date
Ryan Dahl feb26d6c74 Fixes #1203. Add missing scope.Close to fs.sendfileSync 2011-06-20 12:48:38 +02:00
Jorge Chamorro Bieling e7604b1ea7 Retain buffers in fs.read/write()
Closes GH-814.
Closes GH-827.
2011-03-28 15:28:55 -07:00
Ryan Dahl 55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Bert Belder 36846f9b6b Windows: child process fixes 2011-02-08 21:21:39 -08:00
Bert Belder 6329633a3e Windows: open files in binary mode 2011-02-04 14:43:41 -08:00
Bert Belder f9fea12555 Fix windows build 2011-01-24 20:37:15 -08:00
Ryan Dahl cc5e9130bb fs.open should set FD_CLOEXEC 2011-01-24 11:57:21 -08:00
Bert Belder c99962e4cd Misc. cleanups
casts, unused vars, function ordering, /* within comment, etc.
2011-01-18 04:58:29 +01:00
Bert Belder e0f47be9d0 Clean up the way windows headers are included
Plus make inclusion order a little more consistent in general
2011-01-18 04:58:11 +01:00
Bert Belder bea5e6eff6 Re-enable stat watchers on windows
This reverts commit b8a99f94167a25f63ae096d9d5e2cc9cf70cecef.
2010-12-20 23:51:16 +01:00
Bert Belder f48c36f74f Use unicode and bigfile aware stat/fstat 2010-12-20 23:51:14 +01:00
Bert Belder 03a74efb16 Don't break the linux build 2010-12-20 23:51:12 +01:00
Bert Belder 1937c5e3c1 On windows, there's no support (yet) for chown and symlink functions 2010-12-20 23:50:43 +01:00
Bert Belder 51c6867280 On windows, stat() doesn't give you block (size) info 2010-12-20 23:50:43 +01:00
Bert Belder f9a74a2327 On windows, mkdir() doesn't take a mode parameter 2010-12-20 23:50:42 +01:00
Bert Belder 8fc3bac868 Fix fsync/fdatasync for windows 2010-12-20 23:50:41 +01:00
Bert Belder fae7b81589 On windows use eio__pread and eio__pwrite (hack) 2010-12-20 23:50:41 +01:00
Bert Belder c7f0341d88 Include windows.h in node_file.cc 2010-12-20 23:50:40 +01:00
Bert Belder 81b26dc555 Stat watchers don't work on windows yet 2010-12-20 23:50:37 +01:00
Ryan Dahl cea3a95f9f Add ref to buffer during fs.write and fs.read
There was the possibility the buffer could be GCed while the eio_req was
pending.  Still needs test coverage for the fs.read() problem.

See:
http://groups.google.com/group/nodejs/browse_thread/thread/c11f8b683f37cef
2010-11-16 16:26:55 -08:00
Ryan Dahl 016fdab43e Fix argv[6] comment in node_file 2010-10-30 12:04:30 -07:00
Micheil Smith 98e7d3506f Rewrite libeio After callback to use req->result instead of req->errorno for error checking 2010-10-30 11:45:43 -07:00
Ryan Dahl fe74283e1d Fix a few compiler warnings... 2010-10-09 16:04:38 -07:00
Ryan Dahl 1cf538a60a Work to get C++ fast buffers. incomplete 2010-09-09 11:03:48 -07:00
Paul Querna ace2be8aa6 Move the Stat structure functions to node_file.cc
from node.cc, so we can convert fs to a module.
2010-07-14 10:42:32 -07:00
Peter Griess 760fb17bbf Coverity fixes: src/node_file 2010-07-12 13:20:31 -07:00
Blake Mizerany 8c8534046c fix whitespace errors 2010-06-29 23:59:24 -07:00
Ruben Rodriguez 242161bef2 Added new API to Script, and implemented it in the REPL 2010-06-28 15:16:26 -07:00
Micheil Smith d89de07758 Adding experimental support for fs.chown and fs.chownSync.
Notes:
- Currently only accepts numeric user and group ids.
- No tests, as tests depend on getpwuid and getgrgid.
- No documentation, as there is no tests and this is experimental.
2010-05-26 13:37:45 -07:00
Felix Geisendörfer c93e0aaf06 Deprecate string interface for fs.read()
This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-20 16:31:18 -07:00
Ryan Dahl e84395ff8c Revert "Deprecate string interface for fs.read()"
This reverts commit cbbf9e43d1.
2010-05-20 16:11:33 -07:00
Felix Geisendörfer cbbf9e43d1 Deprecate string interface for fs.read()
This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-20 15:25:49 -07:00
Ryan Dahl d8af9d8edf Minor style changes for fs.write code 2010-05-19 14:59:03 -07:00
Felix Geisendörfer c46cbe0de4 Deprecate string interface for fs.write()
This patch makes buffers the preferred input for fs.write() and
fs.writeSync(). The old string interface is still supported by
converting strings to buffers dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-19 12:53:43 -07:00
visionmedia 45948e054d Added better error messages for async and sync fs calls with paths 2010-05-14 19:46:16 -07:00
Andrew Johnston 9599607065 Added posix fsync and fdatasync to fs module 2010-05-14 18:42:22 -07:00
Ben Noordhuis c6c77d535f Support for fstat(2) through fs.fstat() and fs.fstatSync(). Added test cases, updated documentation. 2010-05-12 14:20:43 -07:00
Ryan Dahl 8e5b91c79b Revert "Check for strings.h"
This reverts commit 032f651824.
2010-05-10 16:38:14 -07:00
Ryan Dahl 032f651824 Check for strings.h 2010-05-10 16:30:31 -07:00
Ryan Dahl ea37d98949 Implement writeSync for buffers
(Needs tests still)
2010-05-03 13:26:09 -07:00
Ryan Dahl 3202bce288 Implement fs.readSync for buffers 2010-05-03 13:18:33 -07:00
Ryan Dahl d76091d7d1 Implement fs.read() for Buffers (again) 2010-05-03 12:56:11 -07:00
Ryan Dahl 7a9c81d2dc Fix memory leak with fs.writeSync 2010-05-03 11:41:30 -07:00
Ryan Dahl d13f518010 Revert changes to node_file.cc
Revert "Fix memory leak in fs.writeSync()"

This reverts commit 5457eae28c.

Revert "Implement fs.read() for buffers"

This reverts commit 692f580a07.
2010-05-02 17:38:32 -07:00
Ryan Dahl 5457eae28c Fix memory leak in fs.writeSync() 2010-05-02 17:02:13 -07:00
Ryan Dahl 692f580a07 Implement fs.read() for buffers 2010-04-30 18:36:36 -07:00
Ryan Dahl 20372d2df3 Fix docs in node_file.cc 2010-04-30 15:35:51 -07:00
Ryan Dahl c9e27b11c5 Unify ErrnoException creation 2010-04-22 17:53:45 -07:00
Ryan Dahl 4278f35e89 Add support for Buffer to fs.write 2010-03-19 18:36:22 -07:00
Ryan Dahl d9e3b466a7 Merge branch 'master' into net2 2010-03-02 10:44:25 -08:00