summary refs log tree commit diff stats
path: root/lib/pure/os.nim
Commit message (Collapse)AuthorAgeFilesLines
* 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
* fix 3 minor bugs in joinPath (see #13455) (#13462) [backport]Andrey Makarov2020-02-231-1/+2
|
* relativePath("foo", "foo") is now ".", not "" (#13452)Timothee Cour2020-02-221-3/+14
|
* refs #8391 std/os now shows runtime context for raiseOSError exceptions (#13294)Timothee Cour2020-01-301-52/+51
| | | | | | | | * refs #8391: fix errmsg for setCurrentDir * raiseOSError calls for copyFile * refs #8391 std/os now shows runtime context for raiseOSError exceptions
* csize => csize_t for sysctlTimothee Cour2020-01-281-3/+3
|
* fix lots of bugs with parentDir, refs #8734 (#13236)Timothee Cour2020-01-231-14/+23
|
* new os.isRelativeTo (#13212)Timothee Cour2020-01-231-0/+12
|
* fix #13211 relativePath("foo", ".") (#13213)Timothee Cour2020-01-211-0/+2
|
* times: toUnixFloat, fromUnixFloat (#13044)Timothee Cour2020-01-181-1/+1
|
* export normalizePathEnd (#13152)Timothee Cour2020-01-151-0/+9
|
* feature dracula themed doc (#12816)Andreas Rumpf2019-12-101-2/+2
| | | | | | | | | | * Implement gorgeous Dracula themed Nim documentation * Add color for escape sequences * fixes the test cases * the big CSS cleanup
* #12103 - CI for FreeBSD (#12179)Euan2019-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Ref #12103 - adds FreeBSD CI * Fix getApplFreebsd - length of the string includes the null terminator byte, so minus 1 for result length * Show last commit in setup task. * Remove .git from repository URL * Don't include noisy details showing last commit. * Add FreeBSD build status badge * Fix #12182 - disable tconsole on FreeBSD * Disable tgetaddrinfo on FreebSD as getaddrinfo doesn't support the ICMP protocol. * Install boehm-gc-threaded * Use libgc-threaded.so on FreeBSD rather than libgc.so. * Simplify build failure handling. Update alt text for CI badge. * Disable test on FreeBSD * Simplify build config - use GNU make to build csources - set PATH variable using the environment key - remove modification of config to set CC as this is already set * Install git which seems to be missing from current freebsd images * Revert change to how path is set * Add a comment explaining why the length is truncated * Fix tconsole.
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-7/+0
|
* [backport] Add docs to better distinguish among getProjectPath, ↵Kaushal Modi2019-10-311-1/+6
| | | | | getCurrentDir and currentSourcePath (#12565) Fixes https://github.com/nim-lang/Nim/issues/10477.
* fix several typos in documentation and comments (#12553)Nindaleth2019-10-301-1/+1
|
* splitPath() behavior synchronized with splitFile() (#12481)Artem V L2019-10-281-3/+16
| | | | | | | | * splitPath() behavior synchronized with splitFile() having the expected behavior in all languages splitPath() docstrings update, tests added for both splitPath() and splitFile() * Path splitting refined and described
* #12389: Check working directory for getAppFilename() (#12390)Euan2019-10-101-4/+48
| | | | | | | * Check working directory for exe * Expand symlinks * Use expandFilename() to expand symlinks * Move OpenBSD code to getApplOpenBsd()
* On windows, os.relativePath returns path as is when roots are different (#12329)Tomohiro2019-10-071-28/+91
| | | | | | | * On windows, os.relativePath returns path as is when roots are different * Implement os.sameRoot without windows API * Fix compile error when compiling lib/nimhcr.nim * Fix compile error when compiling lib/nimhcr.nim on Windows
* Updated the code example in the os module to use better grammar. (#12328)Andrew Smith2019-10-021-11/+12
|
* Fix how `relativePath` handle case sensitiviy (#12312) [backport]Tomohiro2019-10-011-2/+2
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-4/+4
|
* fixes #12209Araq2019-09-181-2/+2
|
* Fix mode_t posix definitions (fixes #12119) (#12132)pgkos2019-09-061-20/+20
| | | | | * fixes #12119
* Fixes splitfile (#11918) [bugfix]pgkos2019-08-151-26/+17
|
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-4/+4
| | | | --styleCheck:error
* ABI fixes for OSX/BSD; fixes #6860 (#11666)Andreas Rumpf2019-07-061-1/+1
|