Reputation: 4913
How to check if a file exists in Nim?
A simple question that might be too long to look for in the official documentation!
I wish someone would have asked that question here.
Upvotes: -2
Views: 907
Reputation: 4913
import os
import std/strformat
if fileExists(path):
echo &"path {path} exists!"
Upvotes: 5