Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

翻译: Deno.symlink #37

Merged
merged 5 commits into from
Apr 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1526,36 +1526,34 @@ declare namespace Deno {
* Requires `allow-read` and `allow-write` permissions. */
export function link(oldpath: string, newpath: string): Promise<void>;

/** **UNSTABLE**: `type` argument type may be changed to `"dir" | "file"`.
/** **不稳定**:`type` 参数可能更改为 `"dir" | "file"` 的联合类型。
*
* Creates `newpath` as a symbolic link to `oldpath`.
* 同步方式创建 `newpath` 作为指向 `oldpath` 的符号链接。
*
* The type argument can be set to `dir` or `file`. This argument is only
* available on Windows and ignored on other platforms.
* `type` 参数可以设置为 `dir` 或 `file`。此参数仅在 Windows 上可用,其他平台会被忽略。
*
* NOTE: This function is not yet implemented on Windows.
* 注意:此函数尚未在 Windows 上实现。
*
* Deno.symlinkSync("old/name", "new/name");
*
* Requires `allow-read` and `allow-write` permissions. */
* 需要 `allow-read` `allow-write` 权限 */
export function symlinkSync(
oldpath: string,
newpath: string,
type?: string
): void;

/** **UNSTABLE**: `type` argument may be changed to `"dir" | "file"`
/** **不稳定**:`type` 参数可能更改为 `"dir" | "file"` 的联合类型。
*
* Creates `newpath` as a symbolic link to `oldpath`.
* 创建 `newpath` 作为指向 `oldpath` 的符号链接。
*
* The type argument can be set to `dir` or `file`. This argument is only
* available on Windows and ignored on other platforms.
* `type` 参数可以设置为 `dir` 或 `file`。此参数仅在 Windows 上可用,其他平台会被忽略。
*
* NOTE: This function is not yet implemented on Windows.
* 注意:此函数尚未在 Windows 上实现。
*
* await Deno.symlink("old/name", "new/name");
*
* Requires `allow-read` and `allow-write` permissions. */
* 需要 `allow-read` `allow-write` 权限 */
export function symlink(
oldpath: string,
newpath: string,
Expand Down