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.

преди 3 години
1234567891011121314151617
  1. # ensureDirSync(dir)
  2. Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`.
  3. **Aliases:** `mkdirsSync()`, `mkdirpSync()`
  4. - `dir` `<String>`
  5. ## Example:
  6. ```js
  7. const fs = require('fs-extra')
  8. const dir = '/tmp/this/path/does/not/exist'
  9. fs.ensureDirSync(dir)
  10. // dir has now been created, including the directory it is to be placed in
  11. ```