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.

ensureLink-sync.md 428 B

3 years ago
1234567891011121314151617
  1. # ensureLinkSync(srcpath, dstpath)
  2. Ensures that the link exists. If the directory structure does not exist, it is created.
  3. - `srcpath` `<String>`
  4. - `dstpath` `<String>`
  5. ## Example:
  6. ```js
  7. const fs = require('fs-extra')
  8. const srcpath = '/tmp/file.txt'
  9. const dstpath = '/tmp/this/path/does/not/exist/file.txt'
  10. fs.ensureLinkSync(srcpath, dstpath)
  11. // link has now been created, including the directory it is to be placed in
  12. ```