How to use the lchown function from fs

Find comprehensive JavaScript fs.lchown code examples handpicked from public code repositorys.

130
131
132
133
134
135
136
137
138
139
140
}


function lchown({ uid, gid }) {
  const fs = require('fs');
  fs.writeFileSync('fs12.txt', '123', 'utf8');
  fs.lchown('fs12.txt', uid, gid, () => {
    fs.unlinkSync('fs12.txt');
  });
}

fork icon0
star icon0
watch icon0

+ 2 other calls in file