blob: 7decdbc00b37ee461040bdae493908dd927ba44d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# emptyDirSync(dir)
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.
**Alias:** `emptydirSync()`
- `dir` `<String>`
## Example:
```js
const fs = require('fs-extra')
// assume this directory has a lot of files and folders
fs.emptyDirSync('/tmp/some/dir')
```
|