Andreas Rumpf
3308d26581
breaking change: arrays of char do not convert to cstring; ptr to array of char does
2017-10-10 00:17:20 +02:00
Andreas Rumpf
db0d353281
Merge branch 'stringify-array' of https://github.com/krux02/Nim into krux02-stringify-array
2017-10-09 23:46:24 +02:00
Andreas Rumpf
3bc7dbbd97
os.nim: revert findExe 'improvement' that breaks our builds
2017-09-01 21:35:46 +02:00
Araq
a43eae8e6c
os.findExe: do not return binaries in the cwd
2017-09-01 19:31:27 +02:00
Andreas Rumpf
50666a1f8b
refactor os.nim and ospaths.nim
2017-09-01 10:35:50 +02:00
Andreas Rumpf
8ce4273864
os.nim: do not include and import ospaths
2017-09-01 09:42:32 +02:00
Charlie Barto
0d07117a65
allow non-admins to create symlinks on windows ( #6287 )
2017-08-29 08:30:57 +02:00
Arne Döring
ddea990a70
removed newString proc again, reverted some unnecesary changes
2017-07-24 23:21:51 +02:00
Arne Döring
1f7fc7f279
arrays can now be printed
2017-07-24 23:21:51 +02:00
Emery Hemingway
85d4109a0d
Genode readdir fix ( #6080 )
...
The Genode readdir is inherited from then FreeBSD libc.
2017-07-14 16:43:42 +02:00
Andreas Rumpf
2b72f775e2
make os.nim compile on Windows again
2017-07-09 01:02:14 +02:00
Andreas Rumpf
46dffbed71
minor improvements to os.paramStr
2017-07-08 21:48:03 +02:00
Yuriy Glukhov
0345238d6e
Added moveDir ( #6015 )
2017-06-27 10:09:41 +02:00
Jacek Sieka
ce86b4ad78
Posix from detect ( #5697 )
...
* refactor posix.nim
* types move to separate files for platform-specifc and generic
("other')
* consts move to separate files that get autogenerated by detect.nim
* proc's stay where they are for now, though in a second stage might
move as well
* fix missing when
2017-04-12 23:10:54 +02:00
Emery Hemingway
7e351fc7fa
support for the Genode OS framework ( #5560 )
2017-03-31 23:13:06 +02:00
Anatoly Galiulin
434a7c8426
Fix posix version of moveFile between different filesystems ( #5580 )
2017-03-23 23:40:03 +01:00
Dominik Picheta
d221e6a35c
Improve os.getFileSize documentation to specify the unit.
2017-03-23 21:34:03 +01:00
Eugene Kabanov
336a7c9b3f
Fixes to support Dragonfly BSD. ( #5552 )
...
* Fix kqueue.nim and ansi_c.nim to support dragonfly.
* Fix ioselectors.nim, threads.nim to support dragonfly.
* Fix deprecated dealloc call in tioselectors.nim.
* Fix tfsmonitor.nim test to run only on Linux.
* Fix osproc.nim return wrong exit codes.
* Fix getAppFilename() for dragonfly.
* Fix proper exit code handling.
2017-03-17 08:22:11 +01:00
Araq
5620e08563
minor documentation improvements
2017-02-17 00:00:39 +01:00
Federico Ceratto
0d1aa9225a
Make walkDirRec docstring more clear ( #5377 )
2017-02-12 16:02:50 +01:00
Yuriy Glukhov
fe0291f127
Import ospaths instead of include ( #5233 )
...
* Import ospaths instead of include
* searchExtPos made public
2017-01-18 20:17:53 +01:00
Anatoly Galiulin
d35a8fa174
Disables `paramCount, paramStr` when building posix dynlib. Fixes #4775
2016-12-22 13:55:55 +07:00
Andreas Rumpf
a644471b12
os.nim: posix copyFile showed a weird problem about buffer flushing; worked around via flushFile() call
2016-11-05 22:54:52 +01:00
Andreas Rumpf
2f725e923e
Merge pull request #4924 from nigredo-tori/fix-4917
...
Make createDir return discardable bool
2016-10-24 20:30:52 +02:00
cheatfate
c21bc6c61c
Fix for getCurrentDir().
...
Fix for expandFilename().
Fix for getAppFilename().
2016-10-23 16:41:04 +03:00
Dmitry Polienko
1cd4799b01
Improve as previously discussed
...
Better name for exposed primitive function, checks for pre-existing files
2016-10-22 18:39:10 +07:00
Dmitry Polienko
785e402247
Make createDir more robust
...
Should now properly work for root directories on Windows (after isAbsolute
is fixed)
2016-10-22 18:07:00 +07:00
Dmitry Polienko
45b432b901
Revert createDir signature, expose rawCreateDir
2016-10-22 17:37:28 +07:00
Dmitry Polienko
1f641b1337
Fix for unix and solaris
2016-10-22 13:08:11 +07:00
Dmitry Polienko
48ef6761d8
Make createDir return discardable bool
2016-10-22 12:29:03 +07:00
Simon Ruderich
fc0a3dceaf
os: always use pcLinkToDir as kind for links to directories
...
Only the OS-specific case in walkDir() handled that correctly. Adapt the
general case and handle it in getFileInfo().
2016-09-17 18:32:45 +02:00
Simon Ruderich
21433477df
os: createHardlink: clarify documentation
...
I know no (UNIX-like) system which restricts creation of hardlinks.
2016-09-15 04:20:45 +02:00
Simon Ruderich
4f1886621e
os: createSymlink: fix typo in documentation
2016-09-15 04:20:24 +02:00
Araq
6a1b8e691f
fixes #4764 , fixes #4731 , fixes #4724
2016-09-14 19:59:32 +02:00
Araq
3a3aeb94ec
minor stdlib cleanups
2016-09-09 20:41:26 +02:00
Andreas Rumpf
f1092512e3
tiny style changes
2016-08-09 14:16:26 +02:00
Andreas Rumpf
8876ed23f1
expr and stmt are now deprecated
2016-07-30 16:34:42 +02:00
Andreas Rumpf
60b187513e
stdlib and compiler don't use .immediate anymore
2016-07-29 23:51:01 +02:00
Hans Raaf
e412e5458c
Small changes to the docs to make it easier to find stuff.
2016-07-21 20:09:33 +02:00
Andreas Rumpf
0834cd63d9
prepare Nim codebase for upcoming parser changes
2016-07-15 12:56:03 +02:00
Vladislav Vorobiev
e4b16ac608
Remove line breaks in OSError messages (Windows)
...
Before:
```
Error: unhandled exception: Не удается найти указанный файл.
[OSError]
```
After:
```
Error: unhandled exception: Не удается найти указанный файл. [OSError]
```
2016-07-01 21:50:26 +03:00
Joey Payne
02895ba934
Add walkPattern to return both files and directories
...
Also added `walkDirs` to walk only directories based on the pattern
specified.
2016-06-17 08:35:59 -06:00
Joey Payne
b5f1a82285
Fix #4280 : os.walkFiles yields directories on Unix systems
...
Files were not properly checked to actually be files after globbing.
2016-06-16 14:30:46 -06:00
Jacek Sieka
087db3ce64
remove fauly fix for windows error being overwritten
2016-06-12 14:31:59 +08:00
Jacek Sieka
43996c24a0
fix errno in os.nim
2016-06-08 23:28:16 +08:00
Jacek Sieka
fe2b39f007
remove system/ansi_c include from os
2016-06-05 20:16:26 +08:00
Jacek Sieka
64b0485207
fix types of ansi_c/sysio to more closely match C ABI
...
also fixes some instances of using C library functions when there are
nim alternatives available
2016-06-05 12:03:20 +08:00
coffeepots
d9ed61fa62
Deprecate timeToTimeInfo, add str->time procs
...
* depreciate timeToTimeInfo, add str->time procs
initTime allows creating times from strings. initTimeFromStr offers a default format string compatible with $Time.
timeToTimeInterval changed to work properly.
* Spell {.deprecated.} correctly
* deprecated timeToTimeInfo, removed initTime procs
Is it even worth depreciating timeToTimeInfo rather than just removing it, considering it's just wrong and we have getLocalTime and getGMTime that actually work? Also, if I'm renaming timeToTimeInfo -> toTimeInfo etc, isn't the deprecated tag kind of redundant?
* Updated names for toTime and toTimeInterval procs
* Added type to toTime template
This should allow compilation of os.nim now that toTime is defined in times.nim.
* Updated toTime template to use {.gensym.}
Local templates default to 'bind' semantics, not 'gensym'. This was causing a failure to 'see' the local toTime template.
2016-04-06 10:36:17 +01:00
Dominik Picheta
442a682c33
Better additionalInfo OSError message, ref #2650 .
2016-04-04 14:44:26 +01:00
def
e6dfadf55d
Use /proc/self/exe on NetBSD
2016-03-07 02:13:35 +01:00