Fix system.currentSourcePath() documentation [backport 2.0] (#23243)

The documentation links for `parentDir()` and `getCurrentDir()` are
broken as they are no longer part of `std/os`. Link changed to
`std/private/ospaths2`.

(cherry picked from commit 9c155eaccc)
This commit is contained in:
rockcavera
2024-01-23 18:48:18 -03:00
committed by narimiran
parent 4a1151d6b4
commit 7e6f4723c3

View File

@@ -144,16 +144,17 @@ template currentSourcePath*: string = instantiationInfo(-1, true).filename
## Returns the full file-system path of the current source.
##
## To get the directory containing the current source, use it with
## `os.parentDir() <os.html#parentDir%2Cstring>`_ as `currentSourcePath.parentDir()`.
## `ospaths2.parentDir() <ospaths2.html#parentDir%2Cstring>`_ as
## `currentSourcePath.parentDir()`.
##
## The path returned by this template is set at compile time.
##
## See the docstring of `macros.getProjectPath() <macros.html#getProjectPath>`_
## for an example to see the distinction between the `currentSourcePath`
## and `getProjectPath`.
## for an example to see the distinction between the `currentSourcePath()`
## and `getProjectPath()`.
##
## See also:
## * `getCurrentDir proc <os.html#getCurrentDir>`_
## * `ospaths2.getCurrentDir() proc <ospaths2.html#getCurrentDir>`_
proc slurp*(filename: string): string {.magic: "Slurp".}
## This is an alias for `staticRead <#staticRead,string>`_.