[feature] Added os.delEnv; add delEnv support to nimscript too (#11466)
[feature] Fixes https://github.com/nim-lang/Nim/issues/11452.
This commit is contained in:
parent
eadea343ef
commit
7182922622
6 changed files with 59 additions and 4 deletions
|
|
@ -114,15 +114,19 @@ proc cmpic*(a, b: string): int =
|
|||
cmpIgnoreCase(a, b)
|
||||
|
||||
proc getEnv*(key: string; default = ""): string {.tags: [ReadIOEffect].} =
|
||||
## Retrieves the environment variable of name `key`.
|
||||
## Retrieves the environment variable of name ``key``.
|
||||
builtin
|
||||
|
||||
proc existsEnv*(key: string): bool {.tags: [ReadIOEffect].} =
|
||||
## Checks for the existence of an environment variable named `key`.
|
||||
## Checks for the existence of an environment variable named ``key``.
|
||||
builtin
|
||||
|
||||
proc putEnv*(key, val: string) {.tags: [WriteIOEffect].} =
|
||||
## Sets the value of the environment variable named key to val.
|
||||
## Sets the value of the environment variable named ``key`` to ``val``.
|
||||
builtin
|
||||
|
||||
proc delEnv*(key: string) {.tags: [WriteIOEffect].} =
|
||||
## Deletes the environment variable named ``key``.
|
||||
builtin
|
||||
|
||||
proc fileExists*(filename: string): bool {.tags: [ReadIOEffect].} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue