47 Commits
Author SHA1 Message Date
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
kriskowal 2b91f8d265 Fixed spurious suffixes on fs.readlink. 2010-02-27 21:33:27 -08:00
Ryan Dahl c6cc386819 Merge branch 'master' into net2 2010-02-26 11:34:24 -08:00
Rasmus Andersson b57d946184 added fs.link, fs.symlink, fs.readlink
including sync versions and complete tests
2010-02-22 19:23:06 -08:00
Ryan Dahl a97fdf5c39 Merge branch 'master' into net2 2010-02-22 14:22:20 -08:00
Ryan Dahl 05ae932a0e Implement fs.readdirSync() 2010-02-21 23:06:08 -08:00
Ryan Dahl 4c8889bba2 Revert "Add fs.readdirSync()"
Doesn't work on Linux.

This reverts commit 05d6da6c4a.
2010-02-21 21:53:35 -08:00
isaacs 9acc8a686a Expose fs.lstat 2010-02-21 21:43:45 -08:00
Micheil Smith 05d6da6c4a Add fs.readdirSync() 2010-02-21 16:32:20 -08:00
Ryan Dahl 662fdfed37 fs.closeSync should return Undefined on success 2010-02-19 16:02:14 -08:00
Micheil Smith bcc032e43a Adding interface between node and libeio for Chmod. 2010-02-18 10:13:57 -08:00
Ryan Dahl 07423f3a87 Merge branch 'master' into net2 2010-02-17 15:46:30 -08:00
Ryan Dahl cd41e30bcc Return chunk & bytes read for posix.readSync() 2010-02-11 15:17:32 -08:00
Ryan Dahl dc01587c6c Merge branch 'master' into net2 2010-02-10 14:05:29 -08:00
Ryan Dahl 76c1805c67 Add posix.truncate() 2010-02-07 17:18:28 -08:00
Ryan Dahl 0b07f32819 Merge branch 'master' into net2 2010-02-03 10:00:39 -08:00
Ryan Dahl 987441283b Callbacks from process.fs always start with error object 2010-02-02 11:04:59 -08:00
Ryan Dahl 3377a30fb8 Move cb_persist functions out of dns module 2009-12-29 21:12:29 +01:00
Ryan Dahl 4ddfd8aa42 Fix posix.statSync() 2009-12-09 10:32:19 +01:00
Ryan Dahl 45a806a066 Statically define symbols
~7% improvement in hello world HTTP response bench.
2009-12-09 09:12:01 +01:00
Ryan Dahl 3414eab2f3 Refactor node_file.cc to not use Promises.
At the same time implement synchronous wrappers of the POSIX functions.
These will be undocumented until we settle on an API. Works like this

    // returns promise as before
    posix.mkdir("test").addCallback(function () {
      sys.puts("done");
    });

    // returns undefined, executed synchronously.
    posix.mkdirSync("test");
    sys.puts("done");

This refactoring is a step towards allowing promises to be implemented
purely in javascript.
2009-12-06 10:50:03 +01:00
choonkeat 44d5f212fe Stat::Callback has 2 arguments for callback: current stat info and previous stat info
http://groups.google.com/group/nodejs/msg/f8e51a8e0c74bd85
2009-11-28 15:13:12 +01:00
Ryan Dahl 1cacb50f2b Fix memory leak on fs.write()
Reported by onne@onnlucky.com.
2009-11-22 00:47:36 +01:00
Ryan Dahl 711774c1f0 Remove unreachable lines 2009-11-04 02:18:31 +01:00
Ryan Dahl ae7c9909be fix error from v8 upgrade 2009-10-28 21:35:49 +01:00
Ryan Dahl a5df0f6a65 Prefix all source files with node_ 2009-10-27 11:46:58 +01:00