How to use the fchownSync function from fs
Find comprehensive JavaScript fs.fchownSync code examples handpicked from public code repositorys.
GitHub: blockcollider/bcnode
42 43 44 45 46 47 48 49 50 51
} }; exports.fchmod = co.promisify(fs.fchmod); exports.fchmodSync = fs.fchmodSync; exports.fchown = co.promisify(fs.fchown); exports.fchownSync = fs.fchownSync; exports.fdatasync = co.promisify(fs.fdatasync); exports.fdatasyncSync = fs.fdatasyncSync; exports.fstat = co.promisify(fs.fstat); exports.fstatSync = fs.fstatSync;
22
45
26
779 780 781 782 783 784 785 786 787 788 789
common.runWithInvalidFD((fd) => { fs.fchown(fd, process.getuid(), process.getgid(), common.mustCall(validateError)); assert.throws( () => fs.fchownSync(fd, process.getuid(), process.getgid()), validateError ); }); }
42
19
0
773 774 775 776 777 778 779 780 781 782
if (this[DOCHOWN](entry)) { const uid = this[UID](entry) const gid = this[GID](entry) try { fs.fchownSync(fd, uid, gid) } catch (fchowner) { try { fs.chownSync(entry.absolute, uid, gid) } catch (chowner) {
3
2
0
fs.readFileSync is the most popular function in fs (2736 examples)