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  Get permissions of a given directory with TypeScript

Leave a Reply

Your email address will not be published.

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