Skip to content

Delete a directory and all its contents with TypeScript

Advertisements
  

import * as fs from "fs"

function removeDirectory(path: string): void {
    fs.rmdirSync(path)
}
See also  TypeScript code snippet - angular change How date looks?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.