UNPKG

428 BMarkdownView Raw
1# ensureLinkSync(srcpath, dstpath)
2
3Ensures 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
11const fs = require('fs-extra')
12
13const srcpath = '/tmp/file.txt'
14const dstpath = '/tmp/this/path/does/not/exist/file.txt'
15fs.ensureLinkSync(srcpath, dstpath)
16// link has now been created, including the directory it is to be placed in
17```