Lines Matching refs:fs

26 const fs = require('fs');
33 fs.symlinkSync('unoent-entry', lpath);
35 function stat_resource(resource, statSync = fs.statSync) {
39 const stats = fs.fstatSync(resource);
44 fs.fsyncSync(resource);
45 return fs.fstatSync(resource);
49 mtime = fs._toUnixTimestamp(mtime);
51 const real_mtime = fs._toUnixTimestamp(stats.mtime);
66 // Sub-second precision is OS and fs dependant.
73 const stats = fs.statSync(tmpdir.path);
101 fs.utimes(pathType(tmpdir.path), atime, mtime, common.mustCall((err) => {
104 fs.lutimes(pathType(lpath), atime, mtime, common.mustCall((err) => {
105 expect_ok('lutimes', lpath, err, atime, mtime, fs.lstatSync);
107 fs.utimes(pathType('foobarbaz'), atime, mtime, common.mustCall((err) => {
112 fd = fs.openSync(tmpdir.path, 'r+');
114 fd = fs.openSync(tmpdir.path, 'r');
117 fs.futimes(fd, atime, mtime, common.mustCall((err) => {
132 fs.utimesSync(pathType(tmpdir.path), atime, mtime);
135 fs.lutimesSync(pathType(lpath), atime, mtime);
136 expect_ok('lutimesSync', lpath, undefined, atime, mtime, fs.lstatSync);
141 fs.futimesSync(fd, atime, mtime);
149 fs.utimesSync(pathType('foobarbaz'), atime, mtime);
166 () => fs.utimes(0, new Date(), new Date(), common.mustNotCall()),
170 () => fs.utimesSync(0, new Date(), new Date()),
178 () => fs.utimes(i, new Date(), new Date(), common.mustNotCall()),
182 () => fs.utimesSync(i, new Date(), new Date()),
186 () => fs.futimes(i, new Date(), new Date(), common.mustNotCall()),
190 () => fs.futimesSync(i, new Date(), new Date()),
204 () => fs.futimes(-1, new Date(), new Date(), common.mustNotCall()),
208 () => fs.futimesSync(-1, new Date(), new Date()),