How to use the createFile function from fs-extra
Find comprehensive JavaScript fs-extra.createFile code examples handpicked from public code repositorys.
GitHub: HubWong/PdfPreviewApp
147 148 149 150 151 152 153 154 155 156
'url': 'http://' + config.fdfs.download.host + '/' + fileId, 'title': req.body && req.body.pictitle || filename, 'original': filename, 'state': 'SUCCESS' }; fse.createFile(path.join(static_url, img_url, 'fdfs.list'), function(err) { if (err) throw err; fs.open(path.join(static_url, img_url, 'fdfs.list'), 'a', function(err, fd) { if (err) throw err; fs.write(fd, '\n'+JSON.stringify(result), function(e) {
0
0
0
+ 2 other calls in file
7 8 9 10 11 12 13 14 15 16
const tosPath = path.join(options.config.cacheDir, 'terms-of-service'); const viewedBanner = fs.pathExistsSync(tosPath); const message = 'Our terms of service have changed: https://dashboard.heroku.com/terms-of-service'; if (!viewedBanner) { cli_ux_1.default.warn(message); fs.createFile(tosPath); } } exports.checkTos = checkTos; const hook = async function (options) {
0
0
0
fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)