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