Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

ensureSymlink-sync.md 468 B

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