Skip to content

Commit

Permalink
Fix system.currentSourcePath() documentation [backport 2.0] (#23243)
Browse files Browse the repository at this point in the history
The documentation links for `parentDir()` and `getCurrentDir()` are
broken as they are no longer part of `std/os`. Link changed to
`std/private/ospaths2`.
  • Loading branch information
rockcavera authored Jan 23, 2024
1 parent 06b9e60 commit 9c155ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/system/compilation.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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>`_.
Expand Down

0 comments on commit 9c155ea

Please sign in to comment.