summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-07-16 02:56:50 +0200
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-07-16 02:56:50 +0200
commit2ee228d5d1b3bb6e83988e8e26d74d6d6b8b260c (patch)
treeea211b758608d8dc0689843e9bf72781b29933c4 /lib
parentec6e26735132fe2a67e4c4bb74f92059d0530ce4 (diff)
downloadNim-2ee228d5d1b3bb6e83988e8e26d74d6d6b8b260c.tar.gz
Documents copyFile not copying attributes on posix.
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/os.nim9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 47586962f..bd5e83432 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -832,8 +832,13 @@ proc sameFileContent*(path1, path2: string): bool {.rtl, extern: "nos$1",
 
 proc copyFile*(source, dest: string) {.rtl, extern: "nos$1", 
   tags: [FReadIO, FWriteIO].} =
-  ## Copies a file from `source` to `dest`. If this fails,
-  ## `EOS` is raised.
+  ## Copies a file from `source` to `dest`.
+  ##
+  ## If this fails, `EOS` is raised. On the Windows platform this proc will
+  ## copy the source file's attributes into dest. On other platforms you need
+  ## to use getFilePermissions and setFilePermissions to copy them by hand,
+  ## otherwise `dest` will inherit the default permissions of a newly created
+  ## file for the user.
   when defined(Windows):
     when useWinUnicode:
       let s = newWideCString(source)