godot: Inconsistent File.file_exists(path) values through Desktop/Android
Operating system or device - Godot version: Android
Issue description: On Android, File.file_exists(path) returns false for a scene resource. On Desktop I got that it exists. ResourceLoader is able to load the path on both plataforms. ResourceLoader.has(path) returns True on both platforms.
I think File.file_exists(path) is not able to access res:// path on Android, and that’s why it always return false.
On the other hand, ResourceLoader.has(path) is inconsistent through desktop/android. As for Android, it seems to have the files on it’s cache no matter if the file is loaded into memory or not.
Steps to reproduce:
Run File.file_exists over a path with res:// prefix that you already know it exists and print in console. Deploy to Android and see logs. You will see print results tells you that file does not exist.
print('Path exists: ', File.new().file_exists(path))
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (10 by maintainers)
I think it should be the case, yes. From the point of view of the game programmer, the fact that some files get converted on export should be fully transparent.