Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
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. ```