I just want to clarify if I understand the documentation correctly. If I have a
string that represents a path, and I want test **if it exists** and **is a
file** , I would use
[existFile()](https://nim-lang.org/docs/os.html#existsFile%2Cstring), correct?
The Python equivalent would be:
# You can replace .is_file() with is_dir().
if folder.is_file():
# do work
Run
**Note** : Under
[existsDir()](https://nim-lang.org/docs/os.html#existsDir%2Cstring) and
[symlinkExists()](https://nim-lang.org/docs/os.html#symlinkExists%2Cstring) the
word if is spelled incorrectly, with two ffs.