staticos.nim 581 B

1234567891011121314
  1. ## This module implements path handling like os module but works at only compile-time.
  2. ## This module works even when cross compiling to OS that is not supported by os module.
  3. proc staticFileExists*(filename: string): bool {.compileTime.} =
  4. ## Returns true if `filename` exists and is a regular file or symlink.
  5. ##
  6. ## Directories, device files, named pipes and sockets return false.
  7. discard
  8. proc staticDirExists*(dir: string): bool {.compileTime.} =
  9. ## Returns true if the directory `dir` exists. If `dir` is a file, false
  10. ## is returned. Follows symlinks.
  11. discard