summary refs log tree commit diff stats
path: root/lib/pure/os.nim
Commit message (Collapse)AuthorAgeFilesLines
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-011-1/+1
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-211-4/+4
| | | | | | | | * CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
* [docs minor] close #16553 (#17612)flywind2021-04-021-10/+6
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* followup #17398: `getTempDir`, `getConfigDir` now do not have trailing ↵Timothee Cour2021-03-181-7/+11
| | | | | | | DirSep (#17402) * followup #17398: `getTempDir`, `getConfigDir` now do not have trailing DirSep * fix test
* fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398)Timothee Cour2021-03-171-2/+12
| | | | | * fix #17393 getHomeDir and expandTilde should not include trailing `/` * changelog
* Use `.. warning::` (#17320)konsumlamm2021-03-101-13/+11
|
* stdlib/os: add isAdmin (#17012)Roman Inflianskas2021-03-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | * stdlib/os: add isAdmin * uint8 -> cuchar, assert isAdmin on Azure Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/pure/os.nim docs Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments on #17012 * Raise on errors in #17012 * Check the result of FreeSid in #17012 * Change case in #17012 * Fix memory leak in #17012 * Address comments in #17012 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* use lowercase --define switches (#17283)flywind2021-03-071-17/+17
|
* runnableExamples for walkFiles + friends (#17271)Timothee Cour2021-03-061-0/+12
| | | | | * runnableExamples for walkFiles + friends * address comments
* clarify the docs of existsOrCreateDir a bit (#17182)flywind2021-02-251-4/+3
| | | | | | | * remove unnecessary when statement * remove outdated codes * clarify the docs a bit
* mark inline (#17180)flywind2021-02-241-2/+2
|
* [nodejs backend] paramStr, paramCount (#17082)flywind2021-02-181-9/+33
|
* fix the unused warnings on windows (#17073)flywind2021-02-171-8/+13
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* [Minor] improve the docs of getTempDir (#17058)flywind2021-02-161-3/+5
| | | | | | | | | * [Minor] improve the docs of getTempDir * more clear * Update lib/pure/os.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* better getTempDir (#16914)flywind2021-02-151-14/+47
| | | | | | | | | | | * better getTempDir * fix comments * better * address comments * use uint32
* fix some warnings (#16952)flywind2021-02-081-11/+11
|
* stdlib/os: handle symlinks in copy/move functions (#16709)Roman Inflianskas2021-02-041-107/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | * stdlib/os: handle symlinks in copy/move functions - Added optional `options` argument to `copyFile`, `copyFileToDir`, and `copyFileWithPermissions`. By default, symlinks are followed (copy files symlinks point to). - `copyDir` and `copyDirWithPermissions` copy symlinks as symlinks (instead of skipping them as it was before). - `moveFile` and `moveDir` move symlinks as symlinks (instead of skipping them sometimes as it was before). - Added optional `followSymlinks` argument to `setFilePermissions`. See also: https://github.com/nim-lang/RFCs/issues/319 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 (second iteration) Skip symlinks on Windows. Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* 2.5x- 3x faster copyFile on osx (#16883)Timothee Cour2021-02-011-0/+31
|
* remove private checkSymlink (redundant with symlinkExists) (#16785)Timothee Cour2021-01-221-16/+12
|
* Deprecate TaintedString (#15423)Juan Carlos2021-01-151-9/+9
| | | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* minor fix to Posix part of walkDir (#16234)Andrey Makarov2020-12-031-13/+19
| | | | | | | | | * change break->continue and rewrite one-yield-style * use case statement for clarity * Tiny nit Co-authored-by: Clyybber <darkmine956@gmail.com>
* fix https://github.com/nim-lang/RFCs/issues/286: add FileInfo.blockSize (#16023)Timothee Cour2020-11-181-34/+37
|
* Fix a problem for long symlinks in conda (#15908) [backport]Christopher Dunn2020-11-121-9/+10
| | | * https://github.com/conda-forge/nim-feedstock/commit/d8c80ea69dca30d99073d33845ddd79f9892755b#diff-e1d8e552330911f9f779f85b6f2c00a15e790dcc3fbb3b28f5da1d660a30c5b8
* os: add overload copyFile*(source, dest: string, isDir = false) (#15537)Timothee Cour2020-10-111-1/+7
| | | | | * os: add overload copyFile*(source, dest: string, isDir = false) * renamed to copyFileToDir
* os: make getApplFreebsd available for NetBSD (#15381)alaviss2020-09-211-1/+1
| | | | | | NetBSD was switched to getApplFreebsd() in #15359, however the proc was not made available for the said target. This commit exposes `getApplFreebsd()` to NetBSD.
* Use sysctl on NetBSD to get exe name (#15359)Euan2020-09-181-3/+10
|
* template hygiene (#15240)Andy Davidoff2020-08-291-10/+13
|
* deprecate existsDir; use dirExists instead (#14884)Timothee Cour2020-07-031-17/+11
|
* {.deprecated: [existsFile: fileExists].} (#14735)Timothee Cour2020-07-021-17/+16
| | | | | | | | | * {.deprecated: [existsFile: fileExists].} * s/existsFile/fileExists/ except under deps * workaround pending #14819 * fix test
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-2/+4
| | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog
* fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)Timothee Cour2020-06-161-69/+62
| | | | | | | | | | | | | | | * fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims * remove a comment * Revert "fixes the regression #12860 caused; hotfix" This reverts commit 3d2459bdc0b6d6236a2cd9209ed81c965ee411a5. * Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)" This reverts commit d38853c504d89d6e361f064a17391afaf42d74b8. * noNimScript => noWeirdTarget + noNimJs
* normalizeExe (#14668)Timothee Cour2020-06-151-2/+14
|
* remove isMainModule from json,os,sequtils (#14572)Timothee Cour2020-06-061-63/+0
| | | | | * move json.isMainModule => tjson * move isMainModule => tos,tsequtils
* Fix #14057 - moveFile should overwrite on Windows (#14433)genotrance2020-05-231-2/+2
|
* Fix #14201 (#14202)slangmgh2020-05-031-1/+1
|
* move since from inclrtl to std/private/since (#14188)hlaaftana2020-05-021-0/+1
| | | | * move since from inclrtl to std/private/since * move since import in system below for HCR
* change 'iff' to 'if' to stop "corrections" once and for all (#14182)Miran2020-05-011-5/+5
|
* fixes the regression #12860 caused; hotfixAraq2020-04-301-1/+1
|
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-3/+3
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)Neelesh Chandola2020-04-271-1/+17
| | | | | | | * Remove `paramStr` and `paramCount` from implicitly imported nimscript.nim * Update changelog.md * Update stable nimble commit hash Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #13222: make relativePath more robust and flexible (#13451)Timothee Cour2020-04-211-68/+90
| | | | | | | | | * * relativePath(foo) now works * relativePath(rel, abs) and relativePath(abs, rel) now work (fixes #13222) * relativePath, absolutePath, getCurrentDir now available in more targets (eg: vm, nodejs etc) * fix bug: isAbsolutePath now works with -d:js; add tests * workaround https://github.com/nim-lang/Nim/issues/13469 * remove `relativePath(path)` overload for now * add back changelog after rebase
* #12103 - CI for OpenBSD (#12105)Euan2020-04-211-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Working on OpenBSD CI * Condense steps into 2 steps to make output easier to follow. * Move up one directory after csources build. * Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading. * If runCI fails, run the test results script. * Add email trigger for build failure * Remove .git from repository URL * Disable SFML test on OpenBSD * Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported. * Remove getFilePermissions as it causes CI test failures with NimScript. * Set clang as cc in nim.cfg and use gmake to build csources. * Add getCurrentDir to nimscript. * Remove duplicate getCurrentDir and check for not weirdTarget. * Add CI badge for OpenBSD. * Disable tests which allocate lots of memory for OpenBSD. * Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext. * Simplify building of koch * Disable t8657 on OpenBSD. See issue #13760. * Fix #12142 - tarray_of_channels fails on OpenBSD * Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them. * Install libffi. * Set path to libc for openbsd. * Disable tevalffi for now. * Remove tevalffi.nim. * Use ncpuonline sysctl rather than ncpu. * Disable tacceptcloserace and tasynchttpserver on OpenBSD. * Enable tacceptcloserace and tasynchttpserver. * Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh. * Enable test on OpenBSD. * Disable tflowvar on OpenBSD.
* #13806 - getApplFreebsd might lose data (#13807)Euan2020-03-311-16/+16
| | | | | | | | | * #13806 - first call sysctl with a null buffer to get the length, then alloc buffer and call again * Use csize_t rather than csize * Suggestions from @Clyybber Co-authored-by: Euan Torano <euan.torano@bluesky-wireless.co.uk>
* add error for missing commandLineParams (#13719)Andy Davidoff2020-03-231-0/+4
| | | | | | | * add error for missing commandLineParams * fixup * rewrite
* [ci skip] add back unintentionally removed linenarimiran2020-03-201-0/+1
|
* [RFC] 'walkDir' now has a new 'checkDir' flag, to mimic behaviour of other ↵Timothee Cour2020-03-201-11/+25
| | | | | languages (#13642) Co-authored-by: narimiran
* Add isValidFilename (#13561)Juan Carlos2020-03-071-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add os.isValidFilename * Add os.isValidFilename * Peer Review Feedbacks https://github.com/nim-lang/Nim/pull/13561#discussion_r388013139 * Peer Review Feedbacks https://github.com/nim-lang/Nim/pull/13561#issuecomment-595259568 * Add since to const * Update the documentation comment * Update the changelog * Update lib/pure/os.nim Co-Authored-By: Dominik Picheta <dominikpicheta@googlemail.com> * Update lib/pure/os.nim Co-Authored-By: Dominik Picheta <dominikpicheta@googlemail.com> * Peer Review Feedbacks, Add more Tests Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* fix #13579 joinPath("/foo/", "../a") is now /a (#13586)Andreas Rumpf2020-03-051-0/+1
|
* fix #13455 ; joinPath(a,b) now honors trailing slashes in b (or a if b = "") ↵Timothee Cour2020-02-261-13/+19
| | | | | | | (#13467) * fix #13455 ; joinPath(a,b) now honors trailing slashes in b (or a if b = "") * fix test windows
; 2019-02-14 16:29:52 -0800 committer Kartik Agaram <vc@akkartik.com> 2019-02-14 16:29:52 -0800 4962' href='/akkartik/mu/commit/subx/test_apps?h=main&id=1e43ba2b741e2d59779bbaa0b8919d8c1496e024'>1e43ba2b ^
148ab0a2 ^





fb2ffbd0 ^
fd75b398 ^
0a2d5549 ^
fb2ffbd0 ^






cfea67e9 ^









4fe73d47 ^









4d37fb52 ^


4fe73d47 ^
4d37fb52 ^
4fe73d47 ^
4d37fb52 ^

294a1520 ^
4fe73d47 ^
294a1520 ^
4fe73d47 ^
294a1520 ^

5030d67c ^
4fe73d47 ^
5030d67c ^
4fe73d47 ^
5030d67c ^

294a1520 ^
4fe73d47 ^
294a1520 ^
4fe73d47 ^
294a1520 ^

5030d67c ^
4fe73d47 ^
5030d67c ^
4fe73d47 ^
5030d67c ^

31cb01da ^
4fe73d47 ^
31cb01da ^
4fe73d47 ^
31cb01da ^
5030d67c ^
294a1520 ^
4fe73d47 ^
294a1520 ^
4fe73d47 ^
294a1520 ^

5030d67c ^
4fe73d47 ^
5030d67c ^
4fe73d47 ^
5030d67c ^


4fe73d47 ^
5030d67c ^
4fe73d47 ^
5030d67c ^


4fe73d47 ^
5030d67c ^
4fe73d47 ^
5030d67c ^

c8c2a66c ^
51a20da6 ^
5030d67c ^
51a20da6 ^

5030d67c ^
51a20da6 ^

04a5722e ^
51a20da6 ^
04a5722e ^
51a20da6 ^



04a5722e ^
51a20da6 ^
04a5722e ^
51a20da6 ^
c086f1be ^
51a20da6 ^
29ec821c ^













839dc88d ^
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336