-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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>
- Loading branch information
Showing
24 changed files
with
77 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# ensureLinkSync(srcpath, dstpath) | ||
# ensureLinkSync(srcPath, destPath) | ||
|
||
Ensures that the link exists. If the directory structure does not exist, it is created. | ||
|
||
**Alias:** `createLinkSync()` | ||
|
||
- `srcpath` `<String>` | ||
- `dstpath` `<String>` | ||
- `srcPath` `<String>` | ||
- `destPath` `<String>` | ||
|
||
## Example: | ||
|
||
```js | ||
const fs = require('fs-extra') | ||
|
||
const srcpath = '/tmp/file.txt' | ||
const dstpath = '/tmp/this/path/does/not/exist/file.txt' | ||
fs.ensureLinkSync(srcpath, dstpath) | ||
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# ensureSymlinkSync(srcpath, dstpath[, type]) | ||
# ensureSymlinkSync(srcPath, destPath[, type]) | ||
|
||
Ensures that the symlink exists. If the directory structure does not exist, it is created. | ||
|
||
**Alias:** `createSymlinkSync()` | ||
|
||
- `srcpath` `<String>` | ||
- `dstpath` `<String>` | ||
- `type` `<String>` | ||
- `srcPath` `<String>` | ||
- `destPath` `<String>` | ||
- `type` `<String>` It is only available on Windows and ignored on other platforms. It can be set to `dir`, `file`, or `junction`. | ||
|
||
## Example: | ||
|
||
```js | ||
const fs = require('fs-extra') | ||
|
||
const srcpath = '/tmp/file.txt' | ||
const dstpath = '/tmp/this/path/does/not/exist/file.txt' | ||
fs.ensureSymlinkSync(srcpath, dstpath) | ||
const srcPath = '/tmp/file.txt' | ||
const destPath = '/tmp/this/path/does/not/exist/file.txt' | ||
fs.ensureSymlinkSync(srcPath, destPath) | ||
// symlink has now been created, including the directory it is to be placed in | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.