Tim Caswell
6115df6338
File API tweaks
- Rename fs.cat to fs.readFile
- Move file.write to fs.writeFile
- Allow strings for the flag argument to fs.open
("r", "r+", "w", "w+", "a", "a+")
- Remove the unused 'File' module / class
15 years ago
Ryan Dahl
b82ef28d9d
Rename 'posix' module to 'fs'
15 years ago
Ryan Dahl
70293a43c9
API: Move Promise and EventEmitter into 'events' module
15 years ago
Onne
9d39e18c6d
fixes lib/file.js write, it doesnt allways emit errors or success
15 years ago
Ryan Dahl
7a2e784ad7
Module refactor - almost CommonJS compatible now
API change summary:
* require("/sys.js") becomes require("sys")
* require("circle.js") becomes require("./circle")
* process.path.join() becomes require("path").join()
15 years ago
Ryan Dahl
ad0a4cefb8
Namespace EVERYTHING under process; introduce GLOBAL
http://groups.google.com/group/nodejs/browse_thread/thread/1034fd2ad2cd93e8
15 years ago
Ryan Dahl
3d8b14e6f7
node.fs.* moved into "/posix.js"
use require("/posix.js") to access them.
15 years ago
Tim Caswell
3558952899
DRY up the open, write, read, and close methods on the File prototype.
15 years ago
Timothy Caswell
2b9a9f9140
Clean up many of the reccommendations from jslint in the file.js library
15 years ago
Ryan Dahl
9cd7864fd9
readFile/writeFile to read/write in file library.
as suggested by Bluebie.
15 years ago
Ryan Dahl
8549994c4b
Add readFile to '/file.js'
Thanks Hagen.
15 years ago
Ryan Dahl
a02ca7a590
Add writeFile() to /file.js
Initial patch by Tim Caswell.
15 years ago
Ryan Dahl
cd70d4a9c0
Add "/file.js" buffered disk I/O object.
This is similar to the class node.File which was removed in
82cb1b5acb
.
Needs documentation.
15 years ago