Merge pull request #3137 from vegansk/findFile_absolute

Added absolute path support to options.findFile
This commit is contained in:
Andreas Rumpf 2015-07-23 08:42:53 +02:00
commit f052041648
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