doc: fix code example in fs.symlink method#40414
Conversation
| import { symlink } from 'fs'; | ||
|
|
||
| symlink('./mew', './example/mewtwo', callback); | ||
| symlink('./mew', './mewtwo', callback); |
There was a problem hiding this comment.
The text and bash output below here need to also be updated if we're changing the path.
There was a problem hiding this comment.
Thank youuuu!
Do you mean this?
$ tree example/
example/
├── mew
└── mewtwo -> ./mewI ran the new code example and got this:
➜ tree .
.
├── mew
└── mewtwo -> ./mew
0 directories, 2 filesThere was a problem hiding this comment.
Whoops, you're right, I've changed the description, the bash thing is fine based on the tree command output.
There was a problem hiding this comment.
The bash section does need to be changed. tree shows you the directory tree of the directory you pass to it. Since './example/' is no longer involved in this symlink() example, it doesn't make sense to show the tree of an unrelated directory. tree . would be more relevant since it shows the symlink that was just created.
25dc26f to
b79f2c1
Compare
Fixes: nodejs#40413 PR-URL: nodejs#40414 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
550b460 to
ced518c
Compare
|
Landed in ced518c. |
Fixes: nodejs#40413 PR-URL: nodejs#40414 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Fixes: #40413