From 6a223b057ceac584a1eff201845b7116dd8430e3 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 21 Oct 2011 12:00:08 +0200 Subject: file: correct make_link/2 and make_symlink/2 docs --- lib/kernel/doc/src/file.xml | 17 +++++++++-------- lib/kernel/src/file.erl | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index c6a1f25dd9..719cbba2b8 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -539,7 +539,7 @@

Makes a hard link from Existing to New, on - platforms that support links (Unix). This function returns + platforms that support links (Unix and Windows). This function returns ok if the link was successfully created, or {error, Reason}. On platforms that do not support links, {error,enotsup} is returned.

@@ -566,11 +566,12 @@ Make a symbolic link to a file or directory -

This function creates a symbolic link Name2 to - the file or directory Name1, on platforms that - support - symbolic links (most Unix systems). Name1 need not - exist. This function returns ok if the link was +

This function creates a symbolic link New to + the file or directory Existing, on platforms that + support symbolic links (most Unix systems and Windows beginning with + Vista). + Existing need not exist. + This function returns ok if the link was successfully created, or {error, Reason}. On platforms that do not support symbolic links, {error, enotsup} @@ -580,11 +581,11 @@ eacces

Missing read or write permissions for the parent directories - of Name1 or Name2.

+ of Existing or New.

eexist -

Name2 already exists.

+

New already exists.

enotsup diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl index 0b0f91d86a..2d54ae4c38 100644 --- a/lib/kernel/src/file.erl +++ b/lib/kernel/src/file.erl @@ -267,9 +267,9 @@ read_file(Name) -> make_link(Old, New) -> check_and_call(make_link, [file_name(Old), file_name(New)]). --spec make_symlink(Name1, Name2) -> ok | {error, Reason} when - Name1 :: name(), - Name2 :: name(), +-spec make_symlink(Existing, New) -> ok | {error, Reason} when + Existing :: name(), + New :: name(), Reason :: posix() | badarg. make_symlink(Old, New) -> -- cgit v1.2.3