import * as fsExtra from 'fs-extra';
const filePath: string = 'path/to/file.txt'; const dataToAppend: string = 'New data to append to file';
fsExtra.appendFile(filePath, dataToAppend, (error) => { if (error) { console.error(error); } else { console.log('Data has been appended to file'); } });
index.ts367 chars5 lines
gistlibby LogSnag