Add procs to retrieve project name, directory and full path to nimscript (#9274)
This commit is contained in:
parent
7a5b614edc
commit
027a11d7c8
2 changed files with 18 additions and 0 deletions
|
|
@ -269,6 +269,18 @@ proc nimcacheDir*(): string =
|
|||
## Retrieves the location of 'nimcache'.
|
||||
builtin
|
||||
|
||||
proc projectName*(): string =
|
||||
## Retrieves the name of the current project
|
||||
builtin
|
||||
|
||||
proc projectDir*(): string =
|
||||
## Retrieves the absolute directory of the current project
|
||||
builtin
|
||||
|
||||
proc projectPath*(): string =
|
||||
## Retrieves the absolute path of the current project
|
||||
builtin
|
||||
|
||||
proc thisDir*(): string =
|
||||
## Retrieves the location of the current ``nims`` script file.
|
||||
builtin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue