From bdb9b258471dad9e968bba3fe876195512a412cc Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 30 Aug 2017 17:14:09 +0200 Subject: Improve documentation of Unix.rename Bring it in line with that of Sys.rename. --- otherlibs/unix/unix.mli | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli index d134157061..32ea7f13a6 100644 --- a/otherlibs/unix/unix.mli +++ b/otherlibs/unix/unix.mli @@ -557,7 +557,12 @@ val unlink : string -> unit *) val rename : string -> string -> unit -(** [rename old new] changes the name of a file from [old] to [new]. *) +(** [rename old new] changes the name of a file from [old] to [new], + moving it between directories if needed. If [new] already + exists, its contents will be replaced with those of [old]. + Depending on the operating system, the metadata (permissions, + owner, etc) of [new] can either be preserved or be replaced by + those of [old]. *) val link : string -> string -> unit (** [link source dest] creates a hard link named [dest] to the file -- cgit v1.2.1