Add staticFileExists and staticDirExists (#22278)

This commit is contained in:
Tomohiro
2023-08-18 23:47:47 +09:00
committed by GitHub
parent 7fababd583
commit eb83d20d0d
4 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import std/[assertions, staticos, os]
block:
static:
doAssert staticDirExists("MISSINGFILE") == false
doAssert staticFileExists("MISSINGDIR") == false
doAssert staticDirExists(currentSourcePath().parentDir)
doAssert staticFileExists(currentSourcePath())