@@ -3249,22 +3249,32 @@ changes:
3249
3249
* ` callback ` {Function}
3250
3250
* ` err ` {Error}
3251
3251
3252
- Asynchronous symlink(2). No arguments other than a possible exception are given
3253
- to the completion callback. The ` type ` argument is only available on Windows
3254
- and ignored on other platforms. It can be set to ` 'dir' ` , ` 'file' ` , or
3255
- ` 'junction' ` . If the ` type ` argument is not set, Node will autodetect ` target `
3256
- type and use ` 'file' ` or ` 'dir' ` . If the ` target ` does not exist, ` 'file' ` will
3257
- be used. Windows junction points require the destination path to be absolute.
3258
- When using ` 'junction' ` , the ` target ` argument will automatically be normalized
3259
- to absolute path.
3252
+ Asynchronous symlink(2) which creates the link called ` path ` pointing to
3253
+ ` target ` . No arguments other than a possible exception are given to the
3254
+ completion callback.
3260
3255
3261
- Here is an example below:
3256
+ The ` type ` argument is only available on Windows and ignored on other platforms.
3257
+ It can be set to ` 'dir' ` , ` 'file' ` , or ` 'junction' ` . If the ` type ` argument is
3258
+ not set, Node will autodetect ` target ` type and use ` 'file' ` or ` 'dir' ` . If the
3259
+ ` target ` does not exist, ` 'file' ` will be used. Windows junction points require
3260
+ the destination path to be absolute. When using ` 'junction' ` , the ` target `
3261
+ argument will automatically be normalized to absolute path.
3262
+
3263
+ Relative targets are relative to the link’s parent directory.
3262
3264
3263
3265
``` js
3264
- fs .symlink (' ./foo ' , ' ./new-port ' , callback);
3266
+ fs .symlink (' ./mew ' , ' ./example/mewtwo ' , callback);
3265
3267
```
3266
3268
3267
- It creates a symbolic link named "new-port" that points to "foo".
3269
+ The above example creates a symbolic link ` mewtwo ` in the ` example ` which points
3270
+ to ` mew ` in the same directory:
3271
+
3272
+ ``` bash
3273
+ $ tree example/
3274
+ example/
3275
+ ├── mew
3276
+ └── mewtwo -> ./mew
3277
+ ```
3268
3278
3269
3279
## fs.symlinkSync(target, path[ , type] )
3270
3280
<!-- YAML
0 commit comments