8 fs.readFile('file.txt', function(err, data) { .. });
9 fs.readFile('file.txt', {encoding: 'utf-8'}, function(err, data) { .. });
13 fs.writeFile('output.txt', function(err) { .. });
14 fs.appendFile('output.txt', function(err) { .. });
18 fs.watch('dir OR file.txt', { persistent: true }, function(event, file) {
19 event; /* rename | change */
24 fs.exists('file.txt', function(exists /*bool*/) { ... });
26 fs.stat('file.txt', function(stats) {
29 stats.isSymbolicLink();
34 fs.rename('old.txt', 'new.txt', function(){});
35 fs.chown('file.txt', uid, gid, function(){});
36 fs.symlink('src', 'dest', function(){});
37 fs.unlink('path', function(){});
38 fs.rmdir('path', function(){});
40 fs.readdir('path', function(err, files) { .. }); /* `files` = array of names */
44 fs.realpath('/etc/passwd', function(err, path) { /* "/private/etc/passwd" */ });
48 data = fs.readFileSync('input.txt');
49 fs.writeFileSync('output.txt', data);
50 fs.appendFileSync('output.txt', data);
51 fs.existsSync('file.txt');
55 - http://nodejs.org/api/fs.html