Answers for "how to delete everything from a folder in js"

0

how to delete everything from a folder in js

const fsPromises = require('fs').promises 
// For ES syntax: import { promises as fsPromises } from 'fs'

const directory = 'your/directory/path/here'

await fsPromises.rmdir(directory, {
  recursive: true
})
Posted by: Guest on August-11-2020

Code answers related to "how to delete everything from a folder in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language