Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 463 Bytes

ensureLink-sync.md

File metadata and controls

19 lines (13 loc) · 463 Bytes

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