How to use the sync function from touch
Find comprehensive JavaScript touch.sync code examples handpicked from public code repositorys.
156 157 158 159 160 161 162 163 164 165 166 167
sanitize(datestr + '-' + note.title + '-' + note._id.substr(5)) + '.html' const filePath = path.join(pathToSave, fileName) const outputHtml = await generateHtml(note, { pathToSave }) fs.writeFileSync(filePath, outputHtml, 'utf-8') touch.sync(filePath, { time: new Date(note.updatedAt) }) } } async function generateHtml(note, opts = {}) {
0
1
2
+ 7 other calls in file
173 174 175 176 177 178 179 180 181 182
.replace(config.S3_CLOUD_URL, "") .replace(config.master_url + "/media/preview/", "") ); //create lock // touch.sync(localfile + '.lock'); edit.files_in_use.push(localfile); //if no file var lockfile = localfile + "." + uuid() + ".lock";
0
0
4
+ 2 other calls in file
touch.touchSync is the most popular function in touch (11 examples)