How to use the constants function from fs-extra
Find comprehensive JavaScript fs-extra.constants code examples handpicked from public code repositorys.
54 55 56 57 58 59 60 61 62 63
/** * Returns a Promise that resolves to `true` if `file` exists and `false` * otherwise. */ function isReadable(file) { return accessAsync(file, fs.constants.R_OK).then( () => true, () => false ); }
28
0
2
37 38 39 40 41 42 43 44 45 46
spacing: 1, }); // // ------------------------------------------------------------------------------------------------// // fs.access(".env", fs.constants.F_OK, async (err) => { if (err && err.code === 'ENOENT') { logger.error('- Arquivo ".env"'); var modelo = ` NODE_EN=production
2
7
1
+ 13 other calls in file
GitHub: RizenPanelV1/Blaze
147 148 149 150 151 152 153 154 155 156
const timeCreated = Moment(item.created).isValid() ? Moment(item.created) : Moment('1970-01-01', 'YYYY-MM-DD'); const timeModified = Moment(item.modified).isValid() ? Moment(item.modified) : Moment('1970-01-01', 'YYYY-MM-DD'); return sftp.attrs(reqId, { mode: (item.directory) ? Fs.constants.S_IFDIR | 0o755 : Fs.constants.S_IFREG | 0o644, permissions: (item.directory) ? 0o755 : 0o644, uid: Config.get('docker.container.user', 1000), gid: Config.get('docker.container.user', 1000), size: item.size,
0
0
0
+ 4 other calls in file
fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)