How to use the chownSync function from fs-extra
Find comprehensive JavaScript fs-extra.chownSync code examples handpicked from public code repositorys.
GitHub: PufferPanel/Scales
144 145 146 147 148 149 150 151 152
stream.write({rx: data.length / meta.size}); }); stream.on('end', function () { Logger.verbose(Util.format('Updating file perms for %s (changing to %s:%s)', file.path, server.config.user, server.config.user)); Fs.chownSync(file.path, Userid.uid(server.config.user), Userid.gid(server.config.user)); }); }); });
11
17
0
GitHub: bcomnes/cpx2
59 60 61 62 63 64 65 66 67 68
fs.copySync(source, output) } fs.chmodSync(output, stat.mode) if (options.preserve) { fs.chownSync(output, stat.uid, stat.gid) fs.utimesSync(output, stat.atime, stat.mtime) } }
3
28
0
GitHub: luguslabs/habs
147 148 149 150 151 152 153 154 155 156 157
return path + '/' + element; }, ''); // Set full path permissions fs.chownSync(targetDir, userId, groupId); // Set node keyfile permissions fs.chownSync(`${targetDir}/${fileName}`, userId, groupId); } }; module.exports = {
3
12
0
+ 5 other calls in file
GitHub: encounter/mototools
126 127 128 129 130 131 132 133 134 135
} if (data.hasOwnProperty('uid') && data.hasOwnProperty('gid')) { logdebug('Setting UID ' + data.uid + ', GID ' + data.gid + ' for ' + path); fs.lchownSync(path, data.uid, data.gid); if (followSymlink) { fs.chownSync(realpath, data.uid, data.gid); } } // Linux does not have lchmod, so we have to make sure the target exists if (!stats.isSymbolicLink() || followSymlink) {
0
1
2
fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)