Allow searching for "rename file" in documentation
This commit is contained in:
parent
673f5f3534
commit
56dc7c6f77
1 changed files with 1 additions and 0 deletions
|
|
@ -615,6 +615,7 @@ proc tryMoveFSObject(source, dest: string): bool =
|
|||
proc moveFile*(source, dest: string) {.rtl, extern: "nos$1",
|
||||
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||
## 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):
|
||||
when not defined(windows):
|
||||
# Fallback to copy & del
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue