[S] worked on nim. added changes to NIM docs.

This commit is contained in:
eline
2023-11-29 13:37:44 +01:00
parent e774316a70
commit 59512d7b64
6 changed files with 135 additions and 74 deletions

View File

@@ -0,0 +1,12 @@
import winim/lean
proc fileExists(filename: cstring): bool =
result = GetFileAttributesA(filename) != INVALID_FILE_ATTRIBUTES
const
filename = "C:\\path\\to\\your\\file.txt" # double-\ because it's an escape character.
if fileExists(filename):
echo "File exists."
else:
echo "File does not exist."