summary refs log tree commit diff stats
path: root/lib/pure/os.nim
Commit message (Collapse)AuthorAgeFilesLines
* fix #8225 os.isHidden was buggy on posix (#8315)Timothee Cour2018-10-151-23/+17
| | | | | | * fix #8225 isHidden was broken on posix * scope rest of tos.nim under blocks to avoid variable scope bugs
* os: use unlink() to remove file (#9220)alaviss2018-10-091-3/+1
| | | | | removeFile() behavior should now be consistant between Windows and POSIX Fixes #9200
* [os] clarify docs for existsDir (#9212)Timothee Cour2018-10-091-1/+1
| | | | | | * Update os.nim * Update os.nim
* Fix #9126: use splitPath instead of substrYasuhiro Horimoto2018-09-301-2/+2
|
* os: add getAppFilename() implementation for HaikuLeorize2018-09-241-0/+20
|
* os.nim: allow walkDir to work on hierarchies with dangling symbolic links; ↵Andreas Rumpf2018-09-241-5/+1
| | | | refs #9034
* even more strict isNil handling for strings/seqs in order to detect bugsAraq2018-08-221-3/+8
|
* Genode fixes (#8501)Emery Hemingway2018-08-161-2/+8
| | | | | | | | | | | | | * Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
* Haiku support for Nim (#8542)alaviss2018-08-141-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * posix_other: Haiku now has spawn.h This is added per https://dev.haiku-os.org/ticket/13446 * posix_other: Add Haiku specific Dirent members * cpuinfo: Add an implementation for Haiku * distros: Add basic Haiku support * encodings: update Haiku support * fenv, math: Haiku now provides libm * times: Add Haiku struct members * ansi_c, osalloc: Add Haiku constants * threads: Add Haiku support * testament: Haiku uses LIBRARY_PATH * nim.cfg: Update Haiku support libnetwork should only be linked if network functions are used * threads: Haiku does not support -pthread switch * tworkingdir: Haiku's env is in /bin * posix_other: add SIGKILLTHR for Haiku * sockets: link with libnetwork on Haiku * coro: correct ucontext.h location http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html * coro: ucontext backend is not available on Haiku Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX * coro: fix setjmp backend The compiler does not allow statements after a noreturn function * nativesockets: Haiku doesn't support AI_V4MAPPED * system: hostOS can contains "haiku" * os: add support for Haiku's packagefs packagefs is read-only, but there are writable holes to the underlying file system as well * os: update constant for Haiku
* addresses issue #8391 show runtime context on some failed operations (#8393)Timothee Cour2018-07-231-4/+4
|
* add os.absolutePath; fixes #8174 (#8213)Timothee Cour2018-07-101-0/+20
| | | | | | | | | | * add os.absolutePath * fixup * fixup * Fixes absolutePath error message.
* Add normalizePath and testsFederico Ceratto2018-07-061-2/+43
|
* Nintendo switch support (#8069)Joey2018-06-271-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add config section for Nintendo Switch * Add compiler configuration for Nintendo Switch and it's CPU * Add specific lib code for Nintendo Switch * Add GC support for Nintendo Switch * Update changelog for Nintendo Switch * Update changelog with more info about fixed paths * Cleaned up GC memory management a bit * Relocate docs for Switch * Rename aarch64NoneElfGcc to nintendoSwitchGCC * Remove armv8a57 * Fix installer.ini * Reuse code in linux and amd64 * Add posix defs for nintendo switch * Add more defined sections for nintendo switch * Remove old comment * Add what's not supported for Nintendo Switch docs * Make nintendoswitch == posix * Remove DEVKITPRO references from nim.cfg * Make PR extccomp changes * Remove Result type alias * Add separate switch consts file * Update docs for nintendo switch * Fix travis errors with undefined consts and add correct wait.h procs
* fixes merge conflictAndreas Rumpf2018-06-111-1/+1
|\
| * Native access to Genode environmentEmery Hemingway2018-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a 'GenodeEnv' type and a 'componentConstructHook' to the system module. The 'componentConstructHook' allows for detection of POSIX style programs that exit implicitly or native Genode components that initialize to serve RPC requests and OS signals. This hook takes a 'GenodeEnv' argument so that the environment interface is passed cleanly to application code after globals are initialized. This is an typed pointer to a C++ object, procedures for accessing the environment will be available from a Nimble library and not included in the standard library. The standard library has an internal pointer to the environment object but this is not for external use, the undocumented global environment pointer has been removed.
* | fixex merge conflictsAraq2018-06-081-12/+20
|\|
| * Use higher time resolution when available in os.nim (#7709)Oscar Nihlgård2018-06-041-12/+20
| |
* | Merge branch 'devel' into araq-big-refactoringAndreas Rumpf2018-05-281-1/+2
|\|
| * Update existsFile documentation (#7888)Federico Ceratto2018-05-271-1/+2
| |
* | Merge branch 'devel' into araq-big-refactoringAndreas Rumpf2018-05-211-1/+3
|\|
| * remove unneeded check on lengthkoranza2018-05-191-1/+1
| |
| * check string lengths to avoid index out of boundkoranza2018-05-181-2/+4
| |
* | os.nim: don't use echo for error reportingAndreas Rumpf2018-05-181-1/+1
|/
* 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
|/