[S] Worked on nim.
This commit is contained in:
11
elinethingz/utils/stealfile.nim
Normal file
11
elinethingz/utils/stealfile.nim
Normal file
@@ -0,0 +1,11 @@
|
||||
import winim/lean
|
||||
|
||||
proc fileExists(filename: cstring): bool =
|
||||
result = GetFileAttributesA(filename) != INVALID_FILE_ATTRIBUTES
|
||||
|
||||
const
|
||||
filename = "C:\\path\\to\\your\\file.txt"
|
||||
if fileExists(filename):
|
||||
echo "The file exists!"
|
||||
else:
|
||||
echo "The file does not exist."
|
||||
Reference in New Issue
Block a user