Added absolute path support to options.findFile
This commit is contained in:
parent
6b00160938
commit
506b90cea8
2 changed files with 16 additions and 7 deletions
|
|
@ -1,6 +1,12 @@
|
|||
import os
|
||||
|
||||
template getScriptDir(): string =
|
||||
parentDir(instantiationInfo(-1, true).filename)
|
||||
|
||||
const
|
||||
myRes = slurp"../../readme.txt"
|
||||
relRes = slurp"../../readme.txt"
|
||||
absRes = slurp(parentDir(parentDir(getScriptDir())) / "readme.txt")
|
||||
|
||||
echo myRes
|
||||
echo relRes
|
||||
echo absRes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue