Allow searching for "rename file" in documentation

This commit is contained in:
Federico Ceratto 2018-04-07 12:56:16 +01:00 • committed by GitHub
commit 56dc7c6f77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -615,6 +615,7 @@ proc tryMoveFSObject(source, dest: string): bool =
proc moveFile*(source, dest: string) {.rtl, extern: "nos$1", proc moveFile*(source, dest: string) {.rtl, extern: "nos$1",
tags: [ReadIOEffect, WriteIOEffect].} = tags: [ReadIOEffect, WriteIOEffect].} =
## Moves a file from `source` to `dest`. If this fails, `OSError` is raised. ## Moves a file from `source` to `dest`. If this fails, `OSError` is raised.
## Can be used to `rename files`:idx:
if not tryMoveFSObject(source, dest): if not tryMoveFSObject(source, dest):
when not defined(windows): when not defined(windows):
# Fallback to copy & del # Fallback to copy & del