fsPromises.symlink(target, path[, type])
target
<string> | <Buffer> | <URL>path
<string> | <Buffer> | <URL>type
<string> 默认值:'file'
- 返回: <Promise>
type
参数仅在 Windows 平台上使用,可以是 'dir'
、'file'
或 'junction'
之一。
Windows 交接点要求目标路径是绝对路径。
使用 'junction'
时,target
参数将自动规范化为绝对路径。
target
<string> | <Buffer> | <URL>path
<string> | <Buffer> | <URL>type
<string> Default:'file'
- Returns: <Promise>
Creates a symbolic link then resolves the Promise
with no arguments upon
success.
The type
argument is only used on Windows platforms and can be one of 'dir'
,
'file'
, or 'junction'
. Windows junction points require the destination path
to be absolute. When using 'junction'
, the target
argument will
automatically be normalized to absolute path.