diff options
author | Yuriy Glukhov <yglukhov@users.noreply.github.com> | 2017-06-27 11:09:41 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-06-27 10:09:41 +0200 |
commit | 0345238d6e90cf4daffe301e0c82a6e30741b2e2 (patch) | |
tree | 628f118e1384318b3b228f8562f65899fe973c53 /lib/windows | |
parent | baf685461bad85931030a56964fceec9edc1ec59 (diff) | |
download | Nim-0345238d6e90cf4daffe301e0c82a6e30741b2e2.tar.gz |
Added moveDir (#6015)
Diffstat (limited to 'lib/windows')
-rw-r--r-- | lib/windows/winlean.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index 164499543..7a221ceb1 100644 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -291,6 +291,14 @@ const FILE_ATTRIBUTE_TEMPORARY* = 256'i32 MAX_PATH* = 260 + + MOVEFILE_COPY_ALLOWED* = 0x2'i32 + MOVEFILE_CREATE_HARDLINK* = 0x10'i32 + MOVEFILE_DELAY_UNTIL_REBOOT* = 0x4'i32 + MOVEFILE_FAIL_IF_NOT_TRACKABLE* = 0x20'i32 + MOVEFILE_REPLACE_EXISTING* = 0x1'i32 + MOVEFILE_WRITE_THROUGH* = 0x8'i32 + type WIN32_FIND_DATA* {.pure.} = object dwFileAttributes*: int32 @@ -342,6 +350,9 @@ when useWinUnicode: proc moveFileW*(lpExistingFileName, lpNewFileName: WideCString): WINBOOL {. importc: "MoveFileW", stdcall, dynlib: "kernel32".} + proc moveFileExW*(lpExistingFileName, lpNewFileName: WideCString, + flags: DWORD): WINBOOL {. + importc: "MoveFileExW", stdcall, dynlib: "kernel32".} proc getEnvironmentStringsW*(): WideCString {. stdcall, dynlib: "kernel32", importc: "GetEnvironmentStringsW".} @@ -369,6 +380,9 @@ else: proc moveFileA*(lpExistingFileName, lpNewFileName: cstring): WINBOOL {. importc: "MoveFileA", stdcall, dynlib: "kernel32".} + proc moveFileExA*(lpExistingFileName, lpNewFileName: WideCString, + flags: DWORD): WINBOOL {. + importc: "MoveFileExA", stdcall, dynlib: "kernel32".} proc getEnvironmentStringsA*(): cstring {. stdcall, dynlib: "kernel32", importc: "GetEnvironmentStringsA".} |