Lines Matching refs:fs

25 const fs = require('fs');
54 check(fs.access, fs.accessSync, 'foo\u0000bar');
55 check(fs.access, fs.accessSync, 'foo\u0000bar', fs.F_OK);
56 check(fs.appendFile, fs.appendFileSync, 'foo\u0000bar', 'abc');
57 check(fs.chmod, fs.chmodSync, 'foo\u0000bar', '0644');
58 check(fs.chown, fs.chownSync, 'foo\u0000bar', 12, 34);
59 check(fs.copyFile, fs.copyFileSync, 'foo\u0000bar', 'abc');
60 check(fs.copyFile, fs.copyFileSync, 'abc', 'foo\u0000bar');
61 check(fs.lchown, fs.lchownSync, 'foo\u0000bar', 12, 34);
62 check(fs.link, fs.linkSync, 'foo\u0000bar', 'foobar');
63 check(fs.link, fs.linkSync, 'foobar', 'foo\u0000bar');
64 check(fs.lstat, fs.lstatSync, 'foo\u0000bar');
65 check(fs.mkdir, fs.mkdirSync, 'foo\u0000bar', '0755');
66 check(fs.open, fs.openSync, 'foo\u0000bar', 'r');
67 check(fs.readFile, fs.readFileSync, 'foo\u0000bar');
68 check(fs.readdir, fs.readdirSync, 'foo\u0000bar');
69 check(fs.readdir, fs.readdirSync, 'foo\u0000bar', { recursive: true });
70 check(fs.readlink, fs.readlinkSync, 'foo\u0000bar');
71 check(fs.realpath, fs.realpathSync, 'foo\u0000bar');
72 check(fs.rename, fs.renameSync, 'foo\u0000bar', 'foobar');
73 check(fs.rename, fs.renameSync, 'foobar', 'foo\u0000bar');
74 check(fs.rmdir, fs.rmdirSync, 'foo\u0000bar');
75 check(fs.stat, fs.statSync, 'foo\u0000bar');
76 check(fs.symlink, fs.symlinkSync, 'foo\u0000bar', 'foobar');
77 check(fs.symlink, fs.symlinkSync, 'foobar', 'foo\u0000bar');
78 check(fs.truncate, fs.truncateSync, 'foo\u0000bar');
79 check(fs.unlink, fs.unlinkSync, 'foo\u0000bar');
80 check(null, fs.unwatchFile, 'foo\u0000bar', common.mustNotCall());
81 check(fs.utimes, fs.utimesSync, 'foo\u0000bar', 0, 0);
82 check(null, fs.watch, 'foo\u0000bar', common.mustNotCall());
83 check(null, fs.watchFile, 'foo\u0000bar', common.mustNotCall());
84 check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar', 'abc');
89 check(fs.access, fs.accessSync, fileUrl);
90 check(fs.access, fs.accessSync, fileUrl, fs.F_OK);
91 check(fs.appendFile, fs.appendFileSync, fileUrl, 'abc');
92 check(fs.chmod, fs.chmodSync, fileUrl, '0644');
93 check(fs.chown, fs.chownSync, fileUrl, 12, 34);
94 check(fs.copyFile, fs.copyFileSync, fileUrl, 'abc');
95 check(fs.copyFile, fs.copyFileSync, 'abc', fileUrl);
96 check(fs.lchown, fs.lchownSync, fileUrl, 12, 34);
97 check(fs.link, fs.linkSync, fileUrl, 'foobar');
98 check(fs.link, fs.linkSync, 'foobar', fileUrl);
99 check(fs.lstat, fs.lstatSync, fileUrl);
100 check(fs.mkdir, fs.mkdirSync, fileUrl, '0755');
101 check(fs.open, fs.openSync, fileUrl, 'r');
102 check(fs.readFile, fs.readFileSync, fileUrl);
103 check(fs.readdir, fs.readdirSync, fileUrl);
104 check(fs.readdir, fs.readdirSync, fileUrl, { recursive: true });
105 check(fs.readlink, fs.readlinkSync, fileUrl);
106 check(fs.realpath, fs.realpathSync, fileUrl);
107 check(fs.rename, fs.renameSync, fileUrl, 'foobar');
108 check(fs.rename, fs.renameSync, 'foobar', fileUrl);
109 check(fs.rmdir, fs.rmdirSync, fileUrl);
110 check(fs.stat, fs.statSync, fileUrl);
111 check(fs.symlink, fs.symlinkSync, fileUrl, 'foobar');
112 check(fs.symlink, fs.symlinkSync, 'foobar', fileUrl);
113 check(fs.truncate, fs.truncateSync, fileUrl);
114 check(fs.unlink, fs.unlinkSync, fileUrl);
115 check(null, fs.unwatchFile, fileUrl, assert.fail);
116 check(fs.utimes, fs.utimesSync, fileUrl, 0, 0);
117 check(null, fs.watch, fileUrl, assert.fail);
118 check(null, fs.watchFile, fileUrl, assert.fail);
119 check(fs.writeFile, fs.writeFileSync, fileUrl, 'abc');
121 check(fs.access, fs.accessSync, fileUrl2);
122 check(fs.access, fs.accessSync, fileUrl2, fs.F_OK);
123 check(fs.appendFile, fs.appendFileSync, fileUrl2, 'abc');
124 check(fs.chmod, fs.chmodSync, fileUrl2, '0644');
125 check(fs.chown, fs.chownSync, fileUrl2, 12, 34);
126 check(fs.copyFile, fs.copyFileSync, fileUrl2, 'abc');
127 check(fs.copyFile, fs.copyFileSync, 'abc', fileUrl2);
128 check(fs.lchown, fs.lchownSync, fileUrl2, 12, 34);
129 check(fs.link, fs.linkSync, fileUrl2, 'foobar');
130 check(fs.link, fs.linkSync, 'foobar', fileUrl2);
131 check(fs.lstat, fs.lstatSync, fileUrl2);
132 check(fs.mkdir, fs.mkdirSync, fileUrl2, '0755');
133 check(fs.open, fs.openSync, fileUrl2, 'r');
134 check(fs.readFile, fs.readFileSync, fileUrl2);
135 check(fs.readdir, fs.readdirSync, fileUrl2);
136 check(fs.readdir, fs.readdirSync, fileUrl2, { recursive: true });
137 check(fs.readlink, fs.readlinkSync, fileUrl2);
138 check(fs.realpath, fs.realpathSync, fileUrl2);
139 check(fs.rename, fs.renameSync, fileUrl2, 'foobar');
140 check(fs.rename, fs.renameSync, 'foobar', fileUrl2);
141 check(fs.rmdir, fs.rmdirSync, fileUrl2);
142 check(fs.stat, fs.statSync, fileUrl2);
143 check(fs.symlink, fs.symlinkSync, fileUrl2, 'foobar');
144 check(fs.symlink, fs.symlinkSync, 'foobar', fileUrl2);
145 check(fs.truncate, fs.truncateSync, fileUrl2);
146 check(fs.unlink, fs.unlinkSync, fileUrl2);
147 check(null, fs.unwatchFile, fileUrl2, assert.fail);
148 check(fs.utimes, fs.utimesSync, fileUrl2, 0, 0);
149 check(null, fs.watch, fileUrl2, assert.fail);
150 check(null, fs.watchFile, fileUrl2, assert.fail);
151 check(fs.writeFile, fs.writeFileSync, fileUrl2, 'abc');
155 fs.exists('foo\u0000bar', common.mustCall((exists) => {
158 assert(!fs.existsSync('foo\u0000bar'));