mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-18 16:13:55 +00:00
* improve docs * Update docs/ensureSymlink-sync.md Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com> * Update docs/ensureSymlink.md Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com> * add Error type to docs Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com>
463 B
463 B
ensureLinkSync(srcPath, destPath)
Ensures that the link exists. If the directory structure does not exist, it is created.
Alias: createLinkSync()
srcPath<String>destPath<String>
Example:
const fs = require('fs-extra')
const srcPath = '/tmp/file.txt'
const destPath = '/tmp/this/path/does/not/exist/file.txt'
fs.ensureLinkSync(srcPath, destPath)
// link has now been created, including the directory it is to be placed in