I am using Nim Compiler Version 0.17.2 (2017-09-10) [Windows: amd64] with MSYS2+MingW64 on Win7 64 bits.
I know test:test.txt is not a valid DOS/Windows filename. So how to detect it in code? Thanks
import os
try:
copyFile("test.txt", "test:test.txt")
except:
echo "not support" # this will not happend
if existsFile("test:test.txt"):
echo "ok" # this happends because a zero-byte test file is created and treated
else:
echo "no"
the output is ok and a zero-byte test file is created