I create two files,one is main.js,let's see it
var fs = require("fs");
console.log("begin");
fs.open("a.txt",'r',function (err,fd) {
if(err){
return console.log(err);
}
console.log(fd.toString());
})
another file is a.txt
hello world
Now i run node main.js
I can't understand why it show "12"
via baiying
No comments:
Post a Comment