0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/test-file-open.js
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.
2009-05-25 13:17:35 +02:00

19 lines
401 B
JavaScript

include("mjsunit");
var assert_count = 0;
function onLoad () {
var dirname = node.path.dirname(__filename);
var fixtures = node.path.join(dirname, "fixtures");
var x = node.path.join(fixtures, "x.txt");
file = new node.fs.File;
file.onError = function (method, errno, msg) {
assertTrue(false);
};
file.open(x, "r", function () {
assert_count += 1;
file.close();
});
};