Added absolute path support to options.findFile

This commit is contained in:
Anatoly Galiulin 2015-07-21 09:58:26 +06:00
commit 506b90cea8
2 changed files with 16 additions and 7 deletions

View file

@ -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