How to use the readlinkSync function from fs
Find comprehensive JavaScript fs.readlinkSync code examples handpicked from public code repositorys.
GitHub: blockcollider/bcnode
74 75 76 77 78 79 80 81 82 83
exports.readdir = co.promisify(fs.readdir); exports.readdirSync = fs.readdirSync; exports.readFile = co.promisify(fs.readFile); exports.readFileSync = fs.readFileSync; exports.readlink = co.promisify(fs.readlink); exports.readlinkSync = fs.readlinkSync; exports.realpath = co.promisify(fs.realpath); exports.realpathSync = fs.realpathSync; exports.rename = co.promisify(fs.rename); exports.renameSync = fs.renameSync;
22
45
26
182 183 184 185 186 187 188 189 190 191 192 193
}; fs.readlink(nonexistentFile, common.mustCall(validateError)); assert.throws( () => fs.readlinkSync(nonexistentFile), validateError ); }
42
19
0
7075 7076 7077 7078 7079 7080 7081 7082 7083 7084
linkTarget = seenLinks[id]; } } if (linkTarget === null) { fs.statSync(base); linkTarget = fs.readlinkSync(base); } resolvedLink = pathModule.resolve(previous, linkTarget); // track this, if given a cache. if (cache) cache[base] = resolvedLink;
0
0
1
26 27 28 29 30 31 32 33 34 35 36 37 38
fs.writeFileSync(sourceFile, ''); fs.symlinkSync(sourceFile, linkFile); fs.readlink(linkFile, options, common.mustCall(errHandler)); fs.readlinkSync(linkFile, options); } { const fileName = path.resolve(tmpdir.path, 'writeFile');
0
0
0
27 28 29 30 31 32 33 34 35 36 37 38
assert.throws(() => { fs.readlink('path', options, common.mustNotCall()); }, expectedError); assert.throws(() => { fs.readlinkSync('path', options); }, expectedError); assert.throws(() => { fs.writeFile('path', 'data', options, common.mustNotCall());
0
0
0
10 11 12 13 14 15 16 17 18 19
code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' } ); assert.throws( () => fs.readlinkSync(i), { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }
0
0
0
fs.readFileSync is the most popular function in fs (2736 examples)