summary refs log tree commit diff stats
path: root/lib/pure
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/pure
parentec6e26735132fe2a67e4c4bb74f92059d0530ce4 (diff)
downloadNim-2ee228d5d1b3bb6e83988e8e26d74d6d6b8b260c.tar.gz
Documents copyFile not copying attributes on posix.
Diffstat (limited to 'lib/pure')
-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)
le='Blame the previous revision' href='/ahoang/Nim/blame/rod/syntaxes.nim?h=devel&id=90119066adf6a9a2e8d779d4955637c6dd99aba3'>^
91d842e1e ^



e25474154 ^
91d842e1e ^
e25474154 ^




36e25a684 ^

e25474154 ^




d10973adb ^
e25474154 ^

2df9b442c ^
e25474154 ^

2f43fdb83 ^
8be307713 ^
36e25a684 ^
e25474154 ^

92b8fac94 ^


e25474154 ^


91d842e1e ^
36c67455d ^
e25474154 ^


92b8fac94 ^
27dc54cbd ^
e25474154 ^


91d842e1e ^
36c67455d ^
e25474154 ^


92b8fac94 ^
27dc54cbd ^
e25474154 ^
2df9b442c ^
d10973adb ^
e25474154 ^




e25474154 ^
d10973adb ^
438703f59 ^
e25474154 ^


27dc54cbd ^
92b8fac94 ^
e25474154 ^
a489161b1 ^
92b8fac94 ^
2df9b442c ^
a489161b1 ^
92b8fac94 ^
e25474154 ^
a489161b1 ^
e25474154 ^
438703f59 ^
d10973adb ^
92b8fac94 ^
36c67455d ^
2df9b442c ^
92b8fac94 ^
e25474154 ^


2df9b442c ^
e25474154 ^




2df9b442c ^
e25474154 ^



70cf34cbd ^
e25474154 ^





d10973adb ^



e25474154 ^











7bf98411b ^
2df9b442c ^
7bf98411b ^
e25474154 ^
d10973adb ^

e25474154 ^
27dc54cbd ^
2df9b442c ^



e25474154 ^
2df9b442c ^
e25474154 ^
2df9b442c ^
e25474154 ^
2df9b442c ^
e25474154 ^

36e25a684 ^
d10973adb ^
e25474154 ^
5d9153d42 ^
92b8fac94 ^


e25474154 ^
36e25a684 ^
91d842e1e ^


e25474154 ^
91d842e1e ^
36c67455d ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177