summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2021-02-16 13:17:40 -0600
committerGitHub <noreply@github.com>2021-02-16 20:17:40 +0100
commit71feb96c636f9e0f9a3520733a8f266909e72977 (patch)
treedd8ca33d3cda6d6766e188e40f2cc1f385e63cef /lib
parentb7cba9ea089edd186b9937de50f5044162b48258 (diff)
downloadNim-71feb96c636f9e0f9a3520733a8f266909e72977.tar.gz
[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>
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/os.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index c3349beb3..58a565c7a 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -954,13 +954,15 @@ proc getTempDir*(): string {.rtl, extern: "nos$1",
   tags: [ReadEnvEffect, ReadIOEffect].} =
   ## Returns the temporary directory of the current user for applications to
   ## save temporary files in.
-  ## 
-  ## 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 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 in order.
   ## On all platforms, `/tmp` will be returned if the procs fails.
   ##
   ## You can override this implementation
   ## by adding `-d:tempDir=mytempname` to your compiler invocation.
+  ## 
+  ## **Note:** This proc does not check whether the returned path exists.
   ##
   ## See also:
   ## * `getHomeDir proc <#getHomeDir>`_