Ryan Dahl
3d8b14e6f7
node.fs.* moved into "/posix.js"
use require("/posix.js") to access them.
15 years ago
Timothy Caswell
8bf9a42c70
Cleanup node.fs.cat to follow the newer style to match the code of file.writeFile
15 years ago
Ryan Dahl
07792afe0a
Remove "raw" encoding. Rename "raws" to "binary".
Deprecation warnings have been added to help the conversion to this new API.
15 years ago
Ryan Dahl
389c80aece
return error from cat_promise in node.fs.cat
15 years ago
Ryan Dahl
9db2e5f375
Default to utf8 encoding for node.fs.cat()
15 years ago
Ryan Dahl
0d1ec5fdbe
API: node.fs.read() takes a normal encoding parameter.
Removes node.UTF8, node.RAW, node.ASCII enum versions of the encodings.
node.fs.read() now supports "raws" encoding.
15 years ago
Ryan
dbe116ddfe
API: Change arguments of emit(), emitSuccess(), emitError()
Instead of
myemitter.emit("event", [arg1, arg2, arg3]);
the API is now
myemitter.emit("event", arg1, arg2, arg3);
This change saves the creation of an extra array object for each event.
The implementation is also slightly more simple.
15 years ago
Ryan
241950c1df
Add isDirectory(), isFile(), isSocket(), ... methods to stats object.
Thanks to Felix Geisendörfer for the initial patch.
15 years ago
Ryan
116f4dea05
lint
15 years ago
Ryan
82cb1b5acb
API: Remove buffered file object (node.File)
With the addition of non-libeio stdio (17c6a67f15
)
this class is no longer being used internally. It has proved buggy and isn't
full-featured enough to be very useful. Since it's implemented entirely in
javascript it will be easy for someone to extra into their own library if
needed.
15 years ago
Ryan
17c6a67f15
Introduce node.stdio
Remove old stdout, stderr, stdin objects.
15 years ago
Abe Fettig
53b3d6be35
Bugfix: stdin fd (0) being ignored by node.File.
In the case of stdin options.fd is 0, which is considered false, therefore fd
gets set to null intead of 0.
http://groups.google.com/group/nodejs/msg/80849f6aa0b0eaa0
15 years ago
Ryan
4f46c47773
node.fs.File was not passing args to promise callbacks.
Reported by Jacob Rus.
15 years ago
Ryan
b1588e78d9
Fix utf8 scripts, add test. Thanks Urban.
16 years ago
Ryan
e8a5d3d311
remove the callback from node.cat, node.fs.cat
16 years ago
Ryan
e7ad8ab4b0
Clean up some of the event handling code
16 years ago
Ryan
65324866bc
Implement Promises for file i/o
16 years ago
Ryan
2b557c467f
Namespace trimming: remove node.constants
16 years ago
Ryan
7cce31d4e4
Add global print() function.
16 years ago
Ryan
ed283dc280
Fix bug: catting non-existent files
16 years ago
Ryan
b260a9108b
Add errno constants. Move all constants to `node.constants` namespace.
16 years ago
Ryan
e8f177aa2d
Clean up outgoing encoding API. Generally: send(chunk, encoding).
16 years ago
Ryan
2fe090b7f6
Add node.fs prefix to some constants. oops.
16 years ago
Ryan
d1b0ce6d37
Large refactor of file code.
All the c++ code is now reduced to simple wrappers. The node.fs.File object
is defined entirely in javascript now. As is the actionQueue methods.
This makes the boundaries much cleaner. There is still some thought that
needs to go into how exactly the API should behave but this simplification
is a first step.
16 years ago
Ryan
5c2389fada
Remove error codes from file on_completion callbacks. Use file.onError.
The error codes still remain for the two general file system operations:
rename and stat.
Additionally I've removed the actionQueue for file system operations. They
are sent directly into the thread pool.
16 years ago
Ryan
58c13e5192
Namespace File stuff in node.fs
16 years ago
Ryan
6244f77822
Beginnings of file i/o docs. Finish up timers.
16 years ago
Ryan
de6036669d
Add p() like in Ruby.
16 years ago
Ryan
43531093a3
don't die on EPIPE
16 years ago
Ryan
ba17940551
Add accessor File#encoding
16 years ago
Ryan
8a8e9df72e
wasn't sending pos arg for puts()
16 years ago
Ryan
0b1e3240be
add position arguments to File#read and File#write
16 years ago
Ryan
c2decd720f
add File.cat
16 years ago
Ryan
e7dd20dc6e
add File.stat File.exists File.strerror
16 years ago
Ryan
5207226da3
fix a bug with eio polling.
16 years ago
Ryan
dd691decd2
file system methods to be queued.
16 years ago
Ryan
c8e20fbf81
add file.read only. raw encoding right now.
16 years ago
Ryan
12d31dd0b7
file operations are queued.
16 years ago