B4J Question File.exists() - wrong output?

ilan

Expert
Licensed User
Longtime User
hi

i am running a check if a file exists in the file dirassests folder but I am getting FALSE even though the file exists!

1626024880345.png


Waiting for debugger to connect...
Program started.
file exists: false '<<<<<
 

ilan

Expert
Licensed User
Longtime User
From the help:
Returns true if the specified FileName exists in the specified Dir.
Note that the Android file system is case sensitive.
This method should not be used with File.DirAssets.

hi Klaus, i am using b4j not b4a and the name is exactly as in the folder. see the example i have uploaded.
i had never problems with checking if a file exists in file.dirassets folder not with b4a, b4i or b4j.
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Sorry, I was reasoning in B4A.
Then, I looked at B4J File Help, and the text is the same.
Then I tested your project with older B4J versions, even with B4J version 7.51 and it always returns False !?
 
Upvote 0
Top