Hi Folks,
I am really puzzled regarding the File.ListFiles method. For some unknow reason my code isn't working as intended. Having done the neccessary object initialisation, I perform the following command to check for an empty folder..
I then evaluate the return as follows..
However, the code fails to detect the zero count and still executes the code within the If statement, which as a consequence cause an index out of range error (0 reference). I did a log(list1.Size) and even that counts 0, so why does the code still get executed?
Would appreciate any pointers because I'm out of ideas.
Thank you.
I am really puzzled regarding the File.ListFiles method. For some unknow reason my code isn't working as intended. Having done the neccessary object initialisation, I perform the following command to check for an empty folder..
B4X:
list1 = File.ListFiles(Main.SavePath)
I then evaluate the return as follows..
B4X:
If list1.Size>0 Then
.....
.....
.....
End If
However, the code fails to detect the zero count and still executes the code within the If statement, which as a consequence cause an index out of range error (0 reference). I did a log(list1.Size) and even that counts 0, so why does the code still get executed?
Would appreciate any pointers because I'm out of ideas.
Thank you.