You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

emptyDir-sync.md 393 B

3 years ago
12345678910111213141516
  1. # emptyDirSync(dir)
  2. Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted.
  3. **Alias:** `emptydirSync()`
  4. - `dir` `<String>`
  5. ## Example:
  6. ```js
  7. const fs = require('fs-extra')
  8. // assume this directory has a lot of files and folders
  9. fs.emptyDirSync('/tmp/some/dir')
  10. ```