Как мы можем помочь?
Удаление файла
Синхронно
const fs = require('fs');
fs.unlinkSync(sourceUrls);
Асинхронно
import { unlink } from 'node:fs/promises';
try {
await unlink('/tmp/hello');
console.log('successfully deleted /tmp/hello');
} catch (error) {
console.error('there was an error:', error.message);
}