Shigeki Ohtsu
829f96bada
fs: pool size coincide with ReadStream bufferSize
...
pool size of file reading in ReadableStream can be adjustable
with a bufferSize option.
2013-01-04 19:00:16 +01:00
Ben Noordhuis
c6e958d44d
fs: make 'end' work with ReadStream without 'start'
...
Make `fs.createReadStream({ end: 42 })` work.
Before this commit, it worked only when used like this:
`fs.createReadStream({ start: 0, end: 42 })` - only when `start` was specified
by the caller.
Fixes #4423 .
2012-12-28 18:33:51 +01:00
Ben Noordhuis
910e24b53d
fs: remove fs.sendfile()
...
Said function has been broken (and useless) since v0.6.0. Remove it altogether.
Fixes #3854 .
2012-12-28 18:24:35 +01:00
isaacs
fb915ed957
lint
2012-12-21 16:51:43 +00:00
Farid Neshat
dcaebec208
fs: add autoClose=true option to fs.createReadStream
2012-12-20 11:25:39 +01:00
isaacs
44b308b1f7
fs: streams2
2012-12-14 10:52:26 -08:00
isaacs
77ed12fe7a
Merge remote-tracking branch 'ry/v0.8' into master
...
Conflicts:
AUTHORS
ChangeLog
deps/uv/test/test-spawn.c
deps/uv/uv.gyp
src/cares_wrap.cc
src/node.cc
src/node_version.h
test/simple/test-buffer.js
tools/gyp/pylib/gyp/common.py
tools/install.py
2012-12-13 16:57:58 -08:00
Ben Noordhuis
d65832ccd0
fs: fix WriteStream fd leak
...
Close the file descriptor when a write operation fails.
Fixes #4387 .
2012-12-12 09:46:22 +01:00
Ben Noordhuis
6e97b2cc17
fs: fix ReadStream fd leak
...
Close the file descriptor when a read operation fails.
Fixes #4387 .
2012-12-12 09:46:22 +01:00
isaacs
33fa740577
fs: Raise error when null bytes detected in paths
...
Reworking of @bnoordhuis's more aggressive approach.
2012-12-07 16:52:46 -08:00
Ben Noordhuis
1f76a2eddc
fs: add long stacktrace debugging facility
...
Enable long stacktraces if NODE_DEBUG=fs is set in the environment. Only
applies to the default rethrow callback; it's to help you find places where
you forgot to pass in a callback.
2012-12-04 08:12:12 +01:00
Ben Noordhuis
a80434736b
fs: fix 'object is not a function' callback errors
...
Use a default callback if the user omitted one. Avoids errors like the one
below:
fs.js:777
if (err) return callback(err);
^
TypeError: object is not a function
at fs.appendFile (fs.js:777:21)
at Object.oncomplete (fs.js:297:15)
This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile()
when the callback is omitted. Before, they silently swallowed errors.
Fixes #4352 .
2012-12-04 08:05:55 +01:00
isaacs
061f2075cf
string_decoder: Add 'end' method, do base64 properly
2012-10-11 16:46:18 -07:00
isaacs
ae40f1c438
Merge remote-tracking branch 'ry/v0.8' into v0.8-merge
...
Conflicts:
AUTHORS
ChangeLog
deps/openssl/openssl.gyp
deps/uv/src/unix/linux/linux-core.c
deps/uv/src/unix/process.c
deps/uv/src/unix/stream.c
deps/v8/src/arm/builtins-arm.cc
deps/v8/src/arm/code-stubs-arm.cc
deps/v8/src/arm/full-codegen-arm.cc
lib/tls.js
src/node_version.h
test/simple/test-http-client-timeout-agent.js
2012-09-28 09:47:48 -07:00
Ben Noordhuis
39a0836d5c
fs: fix watchFile() missing deletion events
...
Make sure the deletion event gets reported in the following scenario:
1. Watch a file.
2. The initial stat() goes okay.
3. Something deletes the watched file.
4. The second stat() fails with ENOENT.
The second stat() translates into the first 'change' event but a logic error
stopped it from getting emitted.
Fixes #4027 .
2012-09-17 17:52:50 +02:00
isaacs
e5d95ba939
fs: Throw early on invalid encoding args
...
Re #3918
2012-08-27 13:03:30 -07:00
Ben Noordhuis
a177f55b0c
Merge remote-tracking branch 'origin/v0.8'
...
Conflicts:
ChangeLog
src/node_version.h
test/message/stdin_messages.out
tools/install.py
2012-08-17 13:05:20 +02:00
Bert Belder
9918e5d4f6
windows: make junctions work again
...
Closes GH-3879
2012-08-17 02:30:57 +02:00
Ben Noordhuis
5fba3b85c5
fs: fix ReferenceError in truncateSync()
...
Fixes a minor oversight introduced in 168a555 , resulting in the following error:
fs.js:467
return fs.ftruncateSync(path, len, callback);
^
ReferenceError: callback is not defined
at Object.fs.truncateSync (fs.js:467:40)
2012-08-08 23:07:18 +02:00
isaacs
168a555780
fs: fix naming of truncate/ftruncate functions
...
For backwards compatibility, fs.truncate(<number>) will proxy to
fs.ftruncate.
Fix #3805
2012-08-06 08:40:56 -07:00
Ben Noordhuis
2f7e0f2da6
fs: remove undocumented .destroy callbacks
...
The destroy() method of fs.ReadStream and fs.WriteStream takes a callback.
It's a leftover from the node 0.1 days, undocumented and not part of the
streams API. Remove it.
2012-08-06 00:45:32 +02:00
Gil Pedersen
f1fba8d1f5
fs: fix ReadStream / WriteStream missing callback
...
The (undocumented) callback argument to .destroy() was not called if the
stream was no longer readable / writable.
2012-08-02 01:25:53 +02:00
Ben Noordhuis
23f09d7e02
fs: fix readFileSync("/proc/cpuinfo") regression
...
Don't use positional reads. Not all proc files support pread(), especially on
older linux kernels.
Fixes #3808 .
2012-08-01 20:30:40 +02:00
Bert Belder
43a0c88116
windows: correctly prep long path for fs.exists(Sync)
...
Closes GH-3739
2012-07-23 13:55:42 +02:00
Ben Noordhuis
5b5362aa8d
fs: make unwatchFile() remove a specific listener
...
Before this commit, `fs.unwatchFile(path)` removed *all* listeners for `path`.
The function is overloaded now: `fs.unwatchFile(path)` still removes all
listeners, but `fs.unwatchFile(path, cb)` lets you remove a specific listener.
Fixes #3660 .
2012-07-09 15:48:43 +02:00
isaacs
3e0757c101
lint
2012-06-28 22:06:53 -07:00
Bert Belder
0cdeb8ed96
windows: make fs.realpath(Sync) work with UNC paths
...
Closes #3542
2012-06-27 01:59:25 +02:00
isaacs
21aa0df8b2
realpath: No sync cb() calling allowed.
2012-06-26 15:20:26 -07:00
isaacs
5b39929d47
Add --no-deprecation and --trace-deprecation flags
2012-06-21 12:05:33 -07:00
Ben Noordhuis
ef1ffcb717
fs: make fs.watchFile() interval default to 5007
2012-06-21 15:03:21 +02:00
Ben Noordhuis
f0ce98441f
fs: make fs.watchFile() work on windows
2012-06-21 03:05:18 +02:00
isaacs
1d3d02c70d
Fix fs.readfile('/dev/stdin')
...
There is no need for fs.readFile() to be using pread rather than read.
The default semantics of read() are such that subsequent reads are where
we want them anyway.
2012-06-20 10:28:44 -07:00
Andreas Madsen
1e0ce5d1bd
domain: the EventEmitter constructor is now always called in nodecore
2012-06-15 09:49:05 -07:00
Bert Belder
13400e3e58
windows: make symlinks tolerant to forward slashes
...
Closes #3440
2012-06-15 01:37:24 +02:00
isaacs
412c1ab5bc
Fix test-fs-realpath on Windows
...
Also, in the process, fix a bug in fs.realpath on Windows.
If the user has permission to create symlinks, then use symlinks. If
not, then skip over all the tests that cannot be run using Junctions
instead.
2012-06-14 16:15:12 -07:00
Ben Noordhuis
0385b17ce0
fs: fix infinite loop in fs.readFileSync()
...
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFileSync() was busy reading in the file.
2012-06-12 16:31:49 +02:00
Ben Noordhuis
408bfece51
fs: fix infinite loop in fs.readFile()
...
Fix an infinite loop in the case where the file got truncated by a concurrent
writer while fs.readFile() was busy reading in the file.
2012-06-12 16:31:44 +02:00
Shigeki Ohtsu
e3a2dd1b13
fs: fix fs.readFileSync to work on real empty file
2012-06-12 15:02:39 +02:00
Shigeki Ohtsu
4eb2804db9
fs: fix typo in fs.readFile of lying size=0 stat
2012-06-12 15:02:39 +02:00
isaacs
6ce013dd4b
fix fs.readFile with lying size=0 stat results
2012-06-11 15:54:28 -07:00
isaacs
54a4f99c4e
lint
2012-06-11 08:13:36 -07:00
isaacs
131a67e7ef
Fix #3394 fs.realpath: Properly cache symlink targets
2012-06-09 09:43:47 -07:00
isaacs
424bca15c8
Fix fs.realpath to work on Windows
...
1. Make the isRoot check valid
2. Don't cache results based on dev/ino, since those are alwasy 0 on
windows.
2012-06-09 09:43:46 -07:00
isaacs
6332a4cf00
Expose posix realpath on windows as well
2012-06-09 09:43:46 -07:00
Ben Noordhuis
463d6bac8b
fs: make callbacks run in global context
...
Callbacks that were passed to the binding layer ran in the context of the
(internal) binding object. Make sure they run in the global context.
Before:
fs.symlink('a', 'b', function() {
console.log(this); // prints "{ oncomplete: [Function] }"
});
After:
fs.symlink('a', 'b', function() {
console.log(this); // prints "{ <global object> }"
});
2012-06-06 21:49:39 +02:00
Ben Noordhuis
c381662cac
fs: make fs.symlink() with no callback async
...
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
2012-06-06 21:08:38 +02:00
Andreas Madsen
1f3e4a76f9
fs: no end emit after createReadStream.pause()
...
In case a fd option is given to fs.createReadStream a read will instantly
happen. But in the edge case where fd point to an empty file and .pause()
was executed instantly, the end event would emit since no async wait was
between fs.createReadStream and the file read there emits end.
2012-05-27 20:00:19 +02:00
Igor Zinkovsky
39e25528eb
windows: enable creating directory junctions with fs.symlink
2012-05-24 01:15:15 -07:00
Andreas Madsen
a039bad299
fs.watch should not require a listener arguments
...
Since fs.watch returns an event emitter where the change event is exactly
the same as the listener callback, the argument should be required
2012-05-19 18:58:28 -03:00
isaacs
1a2255ab44
Faster fs.readFile and fs.readFileSync
2012-05-16 20:04:44 -07:00
Kevin Bowman
dfcdd5b8aa
fs: add sync open flags 'rs' and 'rs+'
2012-05-16 00:14:46 +02:00
isaacs
643f00d3f9
Merge branch 'master' into v0.6-merge
...
Conflicts:
src/node.cc
2012-05-15 14:21:22 -07:00
isaacs
5164ae3838
Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
...
Conflicts:
ChangeLog
deps/uv/include/uv-private/uv-unix.h
deps/uv/src/unix/core.c
deps/uv/src/unix/sunos.c
deps/v8/src/runtime.cc
doc/api/crypto.markdown
lib/http.js
src/node_version.h
test/gc/test-http-client-timeout.js
wscript
2012-05-15 11:37:34 -07:00
Ben Noordhuis
25aea2a072
fs: hook up handle wrap to owning object
2012-05-15 16:56:49 +02:00
Bert Belder
d8351a2ef4
Automatically close FSWatcher on error
...
Closes #3250
2012-05-13 03:16:19 +02:00
koichik
5f9ffa17b1
fs: fix ReadStream.pause() emits duplicate data event
...
Fixes #3258 .
2012-05-12 10:24:46 +09:00
isaacs
01d146c29f
Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
...
Conflicts:
ChangeLog
Makefile
deps/npm/AUTHORS
deps/npm/html/api/bin.html
deps/npm/html/api/bugs.html
deps/npm/html/api/commands.html
deps/npm/html/api/config.html
deps/npm/html/api/deprecate.html
deps/npm/html/api/docs.html
deps/npm/html/api/edit.html
deps/npm/html/api/explore.html
deps/npm/html/api/help-search.html
deps/npm/html/api/init.html
deps/npm/html/api/install.html
deps/npm/html/api/link.html
deps/npm/html/api/load.html
deps/npm/html/api/ls.html
deps/npm/html/api/npm.html
deps/npm/html/api/outdated.html
deps/npm/html/api/owner.html
deps/npm/html/api/pack.html
deps/npm/html/api/prefix.html
deps/npm/html/api/prune.html
deps/npm/html/api/publish.html
deps/npm/html/api/rebuild.html
deps/npm/html/api/restart.html
deps/npm/html/api/root.html
deps/npm/html/api/run-script.html
deps/npm/html/api/search.html
deps/npm/html/api/shrinkwrap.html
deps/npm/html/api/start.html
deps/npm/html/api/stop.html
deps/npm/html/api/submodule.html
deps/npm/html/api/tag.html
deps/npm/html/api/test.html
deps/npm/html/api/uninstall.html
deps/npm/html/api/unpublish.html
deps/npm/html/api/update.html
deps/npm/html/api/version.html
deps/npm/html/api/view.html
deps/npm/html/api/whoami.html
deps/npm/html/doc/README.html
deps/npm/html/doc/adduser.html
deps/npm/html/doc/bin.html
deps/npm/html/doc/bugs.html
deps/npm/html/doc/build.html
deps/npm/html/doc/bundle.html
deps/npm/html/doc/cache.html
deps/npm/html/doc/changelog.html
deps/npm/html/doc/coding-style.html
deps/npm/html/doc/completion.html
deps/npm/html/doc/config.html
deps/npm/html/doc/deprecate.html
deps/npm/html/doc/developers.html
deps/npm/html/doc/disputes.html
deps/npm/html/doc/docs.html
deps/npm/html/doc/edit.html
deps/npm/html/doc/explore.html
deps/npm/html/doc/faq.html
deps/npm/html/doc/folders.html
deps/npm/html/doc/help-search.html
deps/npm/html/doc/help.html
deps/npm/html/doc/index.html
deps/npm/html/doc/init.html
deps/npm/html/doc/install.html
deps/npm/html/doc/json.html
deps/npm/html/doc/link.html
deps/npm/html/doc/list.html
deps/npm/html/doc/npm.html
deps/npm/html/doc/outdated.html
deps/npm/html/doc/owner.html
deps/npm/html/doc/pack.html
deps/npm/html/doc/prefix.html
deps/npm/html/doc/prune.html
deps/npm/html/doc/publish.html
deps/npm/html/doc/rebuild.html
deps/npm/html/doc/registry.html
deps/npm/html/doc/removing-npm.html
deps/npm/html/doc/restart.html
deps/npm/html/doc/root.html
deps/npm/html/doc/run-script.html
deps/npm/html/doc/scripts.html
deps/npm/html/doc/search.html
deps/npm/html/doc/semver.html
deps/npm/html/doc/shrinkwrap.html
deps/npm/html/doc/star.html
deps/npm/html/doc/start.html
deps/npm/html/doc/stop.html
deps/npm/html/doc/submodule.html
deps/npm/html/doc/tag.html
deps/npm/html/doc/test.html
deps/npm/html/doc/uninstall.html
deps/npm/html/doc/unpublish.html
deps/npm/html/doc/update.html
deps/npm/html/doc/version.html
deps/npm/html/doc/view.html
deps/npm/html/doc/whoami.html
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm.3
deps/npm/package.json
doc/api/url.markdown
lib/http.js
src/node_version.h
test/simple/test-fs-sync-fd-leak.js
2012-05-04 15:12:47 -07:00
Ben Noordhuis
df2c5fa81d
fs: fix file descriptor leak in sync functions
...
Fixes #3202 . This is a back-port of commit 4e290e4 .
2012-05-03 02:49:36 +02:00
Ben Noordhuis
4e290e48b2
fs: fix file descriptor leak in sync functions
...
Fixes #3202 .
2012-05-03 01:08:46 +02:00
Ben Noordhuis
47d6a94656
fs: fix ReadStream / WriteStream double close bug
...
* Calling fs.ReadStream.destroy() or fs.WriteStream.destroy() twice would close
the file descriptor twice. That's bad because the file descriptor may have
been repurposed in the mean time.
* A bad value check in fs.ReadStream.prototype.destroy() would prevent a stream
created with fs.createReadStream({fd:0}) from getting closed.
2012-05-03 01:01:46 +02:00
isaacs
ecca7525cc
Merge remote-tracking branch 'ry/v0.6' into master
...
Conflicts:
AUTHORS
ChangeLog
LICENSE
Makefile
deps/http_parser/test.c
deps/npm/AUTHORS
deps/npm/html/api/bin.html
deps/npm/html/api/bugs.html
deps/npm/html/api/commands.html
deps/npm/html/api/config.html
deps/npm/html/api/deprecate.html
deps/npm/html/api/docs.html
deps/npm/html/api/edit.html
deps/npm/html/api/explore.html
deps/npm/html/api/help-search.html
deps/npm/html/api/init.html
deps/npm/html/api/install.html
deps/npm/html/api/link.html
deps/npm/html/api/load.html
deps/npm/html/api/ls.html
deps/npm/html/api/npm.html
deps/npm/html/api/outdated.html
deps/npm/html/api/owner.html
deps/npm/html/api/pack.html
deps/npm/html/api/prefix.html
deps/npm/html/api/prune.html
deps/npm/html/api/publish.html
deps/npm/html/api/rebuild.html
deps/npm/html/api/restart.html
deps/npm/html/api/root.html
deps/npm/html/api/run-script.html
deps/npm/html/api/search.html
deps/npm/html/api/shrinkwrap.html
deps/npm/html/api/start.html
deps/npm/html/api/stop.html
deps/npm/html/api/submodule.html
deps/npm/html/api/tag.html
deps/npm/html/api/test.html
deps/npm/html/api/uninstall.html
deps/npm/html/api/unpublish.html
deps/npm/html/api/update.html
deps/npm/html/api/version.html
deps/npm/html/api/view.html
deps/npm/html/api/whoami.html
deps/npm/html/doc/README.html
deps/npm/html/doc/adduser.html
deps/npm/html/doc/bin.html
deps/npm/html/doc/bugs.html
deps/npm/html/doc/build.html
deps/npm/html/doc/bundle.html
deps/npm/html/doc/cache.html
deps/npm/html/doc/changelog.html
deps/npm/html/doc/coding-style.html
deps/npm/html/doc/completion.html
deps/npm/html/doc/config.html
deps/npm/html/doc/deprecate.html
deps/npm/html/doc/developers.html
deps/npm/html/doc/disputes.html
deps/npm/html/doc/docs.html
deps/npm/html/doc/edit.html
deps/npm/html/doc/explore.html
deps/npm/html/doc/faq.html
deps/npm/html/doc/folders.html
deps/npm/html/doc/help-search.html
deps/npm/html/doc/help.html
deps/npm/html/doc/index.html
deps/npm/html/doc/init.html
deps/npm/html/doc/install.html
deps/npm/html/doc/json.html
deps/npm/html/doc/link.html
deps/npm/html/doc/list.html
deps/npm/html/doc/npm.html
deps/npm/html/doc/outdated.html
deps/npm/html/doc/owner.html
deps/npm/html/doc/pack.html
deps/npm/html/doc/prefix.html
deps/npm/html/doc/prune.html
deps/npm/html/doc/publish.html
deps/npm/html/doc/rebuild.html
deps/npm/html/doc/registry.html
deps/npm/html/doc/removing-npm.html
deps/npm/html/doc/restart.html
deps/npm/html/doc/root.html
deps/npm/html/doc/run-script.html
deps/npm/html/doc/scripts.html
deps/npm/html/doc/search.html
deps/npm/html/doc/semver.html
deps/npm/html/doc/shrinkwrap.html
deps/npm/html/doc/star.html
deps/npm/html/doc/start.html
deps/npm/html/doc/stop.html
deps/npm/html/doc/submodule.html
deps/npm/html/doc/tag.html
deps/npm/html/doc/test.html
deps/npm/html/doc/uninstall.html
deps/npm/html/doc/unpublish.html
deps/npm/html/doc/update.html
deps/npm/html/doc/version.html
deps/npm/html/doc/view.html
deps/npm/html/doc/whoami.html
deps/npm/lib/npm.js
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm.3
deps/npm/node_modules/fstream-npm/fstream-npm.js
deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
deps/npm/node_modules/fstream-npm/package.json
deps/npm/node_modules/node-gyp/LICENSE
deps/npm/node_modules/node-gyp/lib/build.js
deps/npm/node_modules/node-gyp/lib/install.js
deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
deps/npm/node_modules/node-gyp/node_modules/glob/package.json
deps/npm/node_modules/node-gyp/package.json
deps/npm/package.json
deps/uv/test/test-fs.c
deps/v8/src/regexp-macro-assembler-tracer.cc
deps/v8/src/version.cc
src/node_version.h
src/platform_sunos.cc
test/simple/test-net-write-after-close.js
wscript
2012-04-18 11:57:54 -07:00
isaacs
c75f71dd72
fs.WriteStream: Handle modifications to fs.open
...
If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.
The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.
This fixes isaacs/node-graceful-fs#6 .
2012-04-09 09:03:00 -07:00
isaacs
06ada03ed9
fs.WriteStream: Handle modifications to fs.open
...
If the fs.open method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === fs.open will fail,
because fs.open has been replaced.
The solution is to save a reference to fs.open on the stream itself when
the action is placed in the queue.
This fixes isaacs/node-graceful-fs#6 .
2012-04-09 08:39:13 -07:00
isaacs
45b772d8cb
fs.readFile: Emit 'close' if we don't expect a close later
...
This fixes a regression introduced by 40b7302
2012-04-07 16:53:18 -07:00
Bert Belder
40b7302af8
fs.readFile: don't make the callback before the fd is closed
...
On Windows it is not possible to unlink() the read file in the callback.
This fixes #3051 . A test is included.
2012-04-06 03:13:56 +02:00
AJ ONeal
493a6bb19a
[ISSUE #2554 #2567 ] throw if fs args for 'start' or 'end' are strings
2012-02-27 14:18:51 -08:00
AJ ONeal
7f58d207f3
[ISSUE #2554 #2567 ] throw if fs args for 'start' or 'end' are strings
2012-02-27 14:17:09 -08:00
isaacs
0cdf85e28d
Lint all the JavaScripts.
2012-02-18 15:34:57 -08:00
isaacs
116835561d
Merge remote-tracking branch 'ry/v0.6'
...
Conflicts:
ChangeLog
deps/v8/src/version.cc
deps/v8/tools/gyp/v8.gyp
doc/about/index.html
doc/community/index.html
doc/index.html
doc/logos/index.html
doc/template.html
lib/path.js
lib/querystring.js
src/node_version.h
2012-02-06 15:43:21 -08:00
Christopher Jeffrey
f64989e63b
fs: fix ReadStream fails to read from existing fd
...
A ReadStream constructed from an existing file descriptor failed to start
reading automatically. Avoids a userspace call to ReadStream.prototype._read().
2012-02-04 22:14:58 +01:00
Ben Noordhuis
279e7e7341
fs: add O_EXCL support, exclusive open file
2012-01-31 14:29:32 +01:00
Ben Noordhuis
88b919ea56
fs, test: add file open mode tests
2012-01-31 14:29:27 +01:00
Maciej Małecki
e10ed097cb
path fs: move path.exists* to fs.exists*
...
`path.exists*` functions show a deprecation warning and call functions
from `fs`. They should be removed later.
test: fix references to `path.exists*` in tests
test fs: add test for `fs.exists` and `fs.existsSync`
doc: reflect moving `path.exists*` to `fs`
2012-01-21 14:37:14 +01:00
Emerson Macedo
aa67b1f375
fs: add appendFile() and appendFileSync() functions
2012-01-05 21:39:57 +01:00
Igor Zinkovsky
d6bae2cb95
document mode argument for fs.symlink
2011-12-16 11:16:33 -08:00
Ben Noordhuis
b1b3dc62ff
fs: handle fractional or NaN ReadStream buffer size
...
Fixes #2320 .
2011-12-13 16:31:12 +01:00
Author: Igor Zinkovsky
1f16a7b6e5
Enable long paths on windows
2011-11-25 09:35:52 +01:00
isaacs
0ba78d5f36
Close #2166 Close the fd in lchmod
2011-11-22 14:00:48 -08:00
Benjamin Pasero
b1bb17fd2b
fs: fix fs.realpath on windows to return on error
2011-11-08 13:02:04 +01:00
Ben Noordhuis
04958e88a4
fs: make mkdir() call callback if mode is omitted
...
Fixes #2043 .
2011-11-08 12:48:09 +01:00
Ben Noordhuis
5fd012e67a
fs: don't use octal values, not allowed in strict mode
2011-11-04 13:10:07 +01:00
Ryan Dahl
a936768890
stdout and stderr are blocking when referring to regular files
...
Fixes message tests.
2011-11-03 13:27:33 -07:00
Ben Noordhuis
11d68eb3fc
fs: make mkdir() default to 0777 permissions
...
Fixes #1999 .
2011-11-03 09:37:23 +01:00
Ryan Dahl
7b4370e5f8
Fix test/pummel/test-watch-file.js
2011-10-12 16:19:46 -07:00
talltyler
10f97f9424
Fixing #1774 about issues when running node with --harmony_block_scoping v8 option
...
Fixes #1837 .
2011-10-08 04:33:10 +09:00
Colton Baker
87286cc737
Fixed a lot of jslint errors.
...
Fixes #1831
2011-10-05 18:51:06 -07:00
Igor Zinkovsky
66293f6e98
fix spelling
2011-09-23 09:20:15 -07:00
Igor Zinkovsky
8fe5712477
fs watcher binding
2011-09-22 22:32:33 -07:00
Thomas Shinnick
7dc2c492e9
fs: unguarded fs.watchFile cache statWatchers checking fixed
...
Use hasOwnProperty to check filepath cache; previous code could fail if
a filepath duplicated a chained property name.
Fixes #1637 .
2011-09-12 15:59:00 +09:00
Thomas Shinnick
e58c036c27
fs: add positioned file writing feature to fs.WriteStream
...
Patterned on same feature in ReadStream; a small bit of new code added
plus two refactorings of previous code; added two test files.
Fixes #1645 .
2011-09-12 14:57:49 +09:00
Thomas Shinnick
e4ebeb630e
fs: minor corrections from examining stream read positioning
...
Fix minor typos, one small refactor, and change emit() in a constructor
to a throw
2011-09-12 14:57:43 +09:00
Igor Zinkovsky
65e6ba9cce
Enable link, symlink, and readlink on windows
2011-09-08 12:52:08 -07:00
Daniel Pihlström
fa829b0fd3
convert nonbuffer data to string in fs.writeFile/Sync
...
Fixes #657 .
2011-07-23 23:56:08 +09:00
Yoshihiro Kikuchi
3c4c36068e
fs: added an argument check in fs.watchFile
...
Fixes #1324 .
2011-07-21 13:35:47 +02:00
Ryan Dahl
0a3fc1d9c8
Remove StatWatcher's dep on C++ EventEmitter
2011-07-19 01:23:50 -07:00
Jörn Horstmann
ff50310cc5
Fixed a typo in a comment: "realpatch" -> "realpath"
2011-07-04 19:40:23 +02:00
isaacs
3935adced0
GH-853 fs.lchown and fs.lchmod
2011-04-20 16:04:39 -07:00
isaacs
5cfac21852
GH-853 fs.fchmod and fs.fchown
2011-04-20 16:04:33 -07:00
Felix Geisendörfer
80711b0ff9
Feature: WriteStream#bytesWritten property
...
Implemented a new property for writable file streams that keeps track
of the bytes written (not queued). This helps when you are piping
another stream to a file, and would like to know how big the file is
without having to issue another stat call.
closes #930
2011-04-14 14:26:46 -07:00
Ryan Dahl
598792ba91
Merge branch 'v0.4'
...
Conflicts:
src/platform_sunos.cc
test/simple/test-os.js
2011-04-14 01:11:21 +00:00