[Minor] improve the docs of getTempDir (#17058)
* [Minor] improve the docs of getTempDir * more clear * Update lib/pure/os.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
parent
b7cba9ea08
commit
71feb96c63
1 changed files with 5 additions and 3 deletions
|
|
@ -954,13 +954,15 @@ proc getTempDir*(): string {.rtl, extern: "nos$1",
|
||||||
tags: [ReadEnvEffect, ReadIOEffect].} =
|
tags: [ReadEnvEffect, ReadIOEffect].} =
|
||||||
## Returns the temporary directory of the current user for applications to
|
## Returns the temporary directory of the current user for applications to
|
||||||
## save temporary files in.
|
## save temporary files in.
|
||||||
##
|
##
|
||||||
## On Windows, it calls [GetTempPath](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw)
|
## On Windows, it calls [GetTempPath](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw).
|
||||||
## On Posix based platforms, it will check `TMPDIR`, `TEMP`, `TMP` and `TEMPDIR` environment variables.
|
## On Posix based platforms, it will check `TMPDIR`, `TEMP`, `TMP` and `TEMPDIR` environment variables in order.
|
||||||
## On all platforms, `/tmp` will be returned if the procs fails.
|
## On all platforms, `/tmp` will be returned if the procs fails.
|
||||||
##
|
##
|
||||||
## You can override this implementation
|
## You can override this implementation
|
||||||
## by adding `-d:tempDir=mytempname` to your compiler invocation.
|
## by adding `-d:tempDir=mytempname` to your compiler invocation.
|
||||||
|
##
|
||||||
|
## **Note:** This proc does not check whether the returned path exists.
|
||||||
##
|
##
|
||||||
## See also:
|
## See also:
|
||||||
## * `getHomeDir proc <#getHomeDir>`_
|
## * `getHomeDir proc <#getHomeDir>`_
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue