[m-rev.] for review: Allow rename_file to rename a directory on C# backend.

Julien Fischer jfischer at opturion.com
Fri Aug 26 12:38:09 AEST 2022



On Thu, 25 Aug 2022, Peter Wang wrote:

> io.file.m:
>    As above.
>
> diff --git a/library/io.file.m b/library/io.file.m
> index 173db22f6..986de4842 100644
> --- a/library/io.file.m
> +++ b/library/io.file.m
> @@ -46,9 +46,9 @@
>
>     % rename_file(OldFileName, NewFileName, Result, !IO).
>     %
> -    % Attempts to rename the file OldFileName as NewFileName, binding
> -    % Result to ok/0 if it succeeds, or error/1 if it fails. If OldFileName
> -    % names a file that is currently open, the behaviour is
> +    % Attempts to rename the file or directory OldFileName as NewFileName,
> +    % binding Result to ok/0 if it succeeds, or error/1 if it fails.
> +    % If OldFileName names a file that is currently open, the behaviour is
>     % implementation-dependent. If NewFileName names a file that already
>     % exists the behaviour is also implementation-dependent; on some systems,
>     % the file previously named NewFileName will be deleted and replaced

These changes should also be made to comment above the obsolete version
of this predicate in the io module.

That looks fine otherwise.

Julien.


More information about the reviews mailing list