From 278c7869d2f2536eae8f1fa6ea3ed9377ee6358a Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Fri, 3 Mar 2023 13:57:45 +0100 Subject: Document that Sys.rename works on directories too --- stdlib/sys.mli | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'stdlib') diff --git a/stdlib/sys.mli b/stdlib/sys.mli index e214603e5c..b7d4486529 100644 --- a/stdlib/sys.mli +++ b/stdlib/sys.mli @@ -53,10 +53,11 @@ external remove : string -> unit = "caml_sys_remove" (** Remove the given file name from the file system. *) external rename : string -> string -> unit = "caml_sys_rename" -(** Rename a file. [rename oldpath newpath] renames the file - called [oldpath], giving it [newpath] as its new name, - moving it between directories if needed. If [newpath] already - exists, its contents will be replaced with those of [oldpath]. +(** Rename a file or directory. [rename oldpath newpath] renames the + file or directory called [oldpath], giving it [newpath] as its new name, + moving it between (parent) directories if needed. If a file named + [newpath] already exists, its contents will be replaced with those of + [oldpath]. Depending on the operating system, the metadata (permissions, owner, etc) of [newpath] can either be preserved or be replaced by those of [oldpath]. -- cgit v1.2.1