diff options
author | Jan Midtgaard <mail@janmidtgaard.dk> | 2023-03-03 13:57:45 +0100 |
---|---|---|
committer | Jan Midtgaard <mail@janmidtgaard.dk> | 2023-03-09 16:48:27 +0100 |
commit | 278c7869d2f2536eae8f1fa6ea3ed9377ee6358a (patch) | |
tree | d82827e024017608e8c58c45daa89dde48243c08 /stdlib | |
parent | 0f22c5aec7c9787e832838bca3439b855ca06306 (diff) | |
download | ocaml-278c7869d2f2536eae8f1fa6ea3ed9377ee6358a.tar.gz |
Document that Sys.rename works on directories too
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/sys.mli | 9 |
1 files changed, 5 insertions, 4 deletions
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]. |