Hi all,
today I found some unexpected behaviour and I'd like to hear from you.
I purposedly set right and wrong path for File.Exist, but it seems to work ok in any case.
Here it is my testing
Two considerations:
- it seems that we can place the sub-folder reference indifferently in the dir or the filename parameter
- it seems that something automatically corrects slash/backslashes
ps: I didn't test it on a Linux machine so I can't say if on that it behaves differently.
today I found some unexpected behaviour and I'd like to hear from you.
I purposedly set right and wrong path for File.Exist, but it seems to work ok in any case.
Here it is my testing
B4X:
DataFolder = DBUtils.getdbfolder("myapp")
Log("DataFolder: "&DataFolder) 'backslashes as expected since we are on a Windows PC
'test for a file in a sub-folder. Returns True altough a forwarding slash is used
Log("Image exists : " & File.Exists(DataFolder, "images/test.png"))
'another test, again returns True
Log("Image exists : " & File.Exists(DataFolder&"\images", "test.png"))
- it seems that we can place the sub-folder reference indifferently in the dir or the filename parameter
- it seems that something automatically corrects slash/backslashes
ps: I didn't test it on a Linux machine so I can't say if on that it behaves differently.