FileSize() bug or feature ?
Posted: Sat May 19, 2012 1:39 pm
Hello all,
Look at this simple line of code :
If you run it in a directory where it resides some "jpg" picture, it will not returns "-1" error code (file not found), but the size a jpg.
Since when the parameter of FileSize() is not a filepath but more like a "mask" with wildcard allowed ?
Nothing about that on documentation.
Until now, I trusted FileSize() to know if a file exists or not (with -1 error code), but no I can't, even if the file "*.jpg" doesn't exist, it does not return -1.
Look at this simple line of code :
Code: Select all
Debug Hex(FileSize("*.jpg"))


Since when the parameter of FileSize() is not a filepath but more like a "mask" with wildcard allowed ?

Nothing about that on documentation.
Until now, I trusted FileSize() to know if a file exists or not (with -1 error code), but no I can't, even if the file "*.jpg" doesn't exist, it does not return -1.
