summary refs log tree commit diff stats
path: root/lib/pure/os.nim
Commit message (Collapse)AuthorAgeFilesLines
* remove unneeded check on lengthkoranza2018-05-191-1/+1
|
* check string lengths to avoid index out of boundkoranza2018-05-181-2/+4
|
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-16/+0
|
* more fixes for the new string behaviourAndreas Rumpf2018-04-301-11/+9
|
* remove dead code elimination option (#7669)Jacek Sieka2018-04-231-1/+1
|
* Add `fromWinTime` and deprecate `unixTimeToWinTime`/`winTimeToUnixTime` (#7641)Oscar Nihlgård2018-04-191-8/+6
|
* Change type of `Timeval.tv_sec` to `posix.Time` (#7646)Oscar Nihlgård2018-04-181-1/+1
|
* os.setLastModificationTime*(file: string, t: times.Time) (#7543)Hendrik2018-04-161-3/+19
| | | | | | | | | | | | | * add proc toFILETIME to winlean * add proc toWinTime to times * add proc setFileTime to winlean * openHandle with write access * add proc setLastModificationTime to os * moved epochDiff,rateDiff constants and proc toWinTime The constants were moved out of the when defined(JS) block so that they are alsways available in proc toWinTime. proc toWinTime was moved above the # Deprecated procs comment. Best new location seemed to be with the toUnix proc.
* explicit effects for existsOrCreateDirAndreas Rumpf2018-04-141-1/+2
|
* Sub second time resolution (#6978)Oscar Nihlgård2018-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add deprecation warnings to recently deprecated procs * Fix bad usage of the times module * Introduce sub second resolution * Fix usage of C's time() * Switch to nanosecond resolution * Make Time & Duration opaque again and fix some errors * Change back to TimeInterval for shorthands * Fix JS test * Fix build error for windows * Undeprecate epochTime * Documentation and minor changes * Lots of bugfixes and doc comments * Attempt to make travis & appveyor green * Fix edge cases for dealing with the local timezone * Workaround JS backend overflow/underflow bug * Use better workaround for not knowing the size of time_t * Use all available timezones for tests * Fix indentation * Add procs for accessing the fractional part of a duration * Order time units from smallest to largest since it makes more sense * Include months and years in `TimeUnit` * Review fix
* Allow searching for "rename file" in documentationFederico Ceratto2018-04-071-0/+1
|
* fixes #6939Andreas Rumpf2018-02-021-5/+10
|
* Remove additionalInfo in OSError in findNextFileDominik Picheta2018-01-111-2/+2
|
* correct type for raiseOSErroroskca2018-01-111-3/+3
|
* raiseOSError to indicate the failling of findNextFile in walkDir[Rec]oskca2018-01-111-2/+8
|
* check ERROR_NO_MORE_FILES to prevent walkDir[Rec] to quit prematurelyoskca2018-01-111-2/+2
|
* Modified behavior of walkDirRec (#6952)Dmitry Atamanov2017-12-211-11/+19
|
* Better times module (#6552)GULPF2017-12-181-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * First work on better timezones * Update tests to new api. Removed tests for checking that `isDst` was included when formatting, since `isDst` no longer affects utc offset (the entire utc offset is stored directly in `utcOffset` instead). * Deprecate getLocaltime & getGmTime * Add `now()` as a shorthand for GetTIme().inZone(Local) * Add FedericoCeratto's timezone tests (#6548) * Run more tests in all timezones * Make month enum start at 1 instead of 0 * Deprecate getDayOfWeekJulian * Fix issues with gc safety * Rename TimeInfo => DateTime * Fixes #6465 * Improve isLeapYear * FIx handling negative adjTime * Cleanup: - deprecated toSeconds and fromSeconds, added fromUnix and toUnix instead (that returns int64 instead of float) - added missing doc comments - removed some unnecessary JS specific implementations * Fix misstake in JS `-` for Time * Update usage of TimeEffect * Removed unecessary use of `difftime` * JS fix for local tz * Fix subtraction of months * Fix `days` field in `toTimeInterval` * Style and docs * Fix getDayOfYear for real this time... * Fix handling of adding/subtracting time across dst transitions * Fix some bad usage of the times module in the stdlib * Revert to use proper time resoultion for seeding in random.nim * Move deprecated procs to bottom of file * Always use `epochTime` in `randomize` * Remove TimeInterval normalization * Fixes #6905 * Fix getDayOfWeek for year < 1 * Export toEpochDay/fromEpochDay and change year/month/monthday order * Add asserts for checking that the monthday is valid * Fix some remaining ambiguous references to `Time` * Fix ambiguous reference to Time
* os.nim bugfix: system() returns bullshit on Posix-like systems in generalAndreas Rumpf2017-12-011-1/+1
|
* Clarify paramStr / paramCount use and availability (#6727)Federico Ceratto2017-11-141-9/+11
|
* breaking change: arrays of char do not convert to cstring; ptr to array of ↵Andreas Rumpf2017-10-101-1/+4
| | | | char does
* Merge branch 'stringify-array' of https://github.com/krux02/Nim into ↵Andreas Rumpf2017-10-091-1/+1
|\ | | | | | | krux02-stringify-array
| * removed newString proc again, reverted some unnecesary changesArne Döring2017-07-241-1/+1
| |
| * arrays can now be printedArne Döring2017-07-241-1/+1
| |
* | os.nim: revert findExe 'improvement' that breaks our buildsAndreas Rumpf2017-09-011-6/+1
| |
* | os.findExe: do not return binaries in the cwdAraq2017-09-011-1/+6
| |
* | refactor os.nim and ospaths.nimAndreas Rumpf2017-09-011-266/+54
| |
* | os.nim: do not include and import ospathsAndreas Rumpf2017-09-011-9/+1
| |
* | allow non-admins to create symlinks on windows (#6287)Charlie Barto2017-08-291-1/+3
|/
* Genode readdir fix (#6080)Emery Hemingway2017-07-141-1/+1
| | | The Genode readdir is inherited from then FreeBSD libc.
* make os.nim compile on Windows againAndreas Rumpf2017-07-091-1/+1
|
* minor improvements to os.paramStrAndreas Rumpf2017-07-081-2/+3
|
* Added moveDir (#6015)Yuriy Glukhov2017-06-271-12/+29
|
* Posix from detect (#5697)Jacek Sieka2017-04-121-1/+1
| | | | | | | | | | * 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
* support for the Genode OS framework (#5560)Emery Hemingway2017-03-311-6/+10
|
* Fix posix version of moveFile between different filesystems (#5580)Anatoly Galiulin2017-03-231-21/+45
|
* Improve os.getFileSize documentation to specify the unit.Dominik Picheta2017-03-231-1/+2
|
* Fixes to support Dragonfly BSD. (#5552)Eugene Kabanov2017-03-171-3/+7
| | | | | | | | | * 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.
* minor documentation improvementsAraq2017-02-171-1/+1
|
* Make walkDirRec docstring more clear (#5377)Federico Ceratto2017-02-121-2/+2
|
* Import ospaths instead of include (#5233)Yuriy Glukhov2017-01-181-3/+4
| | | | | * Import ospaths instead of include * searchExtPos made public
* Disables ``paramCount``, ``paramStr`` when building posix dynlib. Fixes #4775Anatoly Galiulin2016-12-221-1/+1
|
* os.nim: posix copyFile showed a weird problem about buffer flushing; worked ↵Andreas Rumpf2016-11-051-0/+1
| | | | around via flushFile() call
* Merge pull request #4924 from nigredo-tori/fix-4917Andreas Rumpf2016-10-241-9/+47
|\ | | | | Make createDir return discardable bool
| * Improve as previously discussedDmitry Polienko2016-10-221-11/+21
| | | | | | | | Better name for exposed primitive function, checks for pre-existing files
| * Make `createDir` more robustDmitry Polienko2016-10-221-1/+3
| | | | | | | | | | Should now properly work for root directories on Windows (after isAbsolute is fixed)
| * Revert createDir signature, expose rawCreateDirDmitry Polienko2016-10-221-12/+15
| |
| * Fix for unix and solarisDmitry Polienko2016-10-221-6/+5
| |
| * Make createDir return discardable boolDmitry Polienko2016-10-221-11/+35
| |
* | Fix for getCurrentDir().cheatfate2016-10-231-36/+125
|/ | | | | Fix for expandFilename(). Fix for getAppFilename().