Hello Community
I'm looking for a way to test if a file exists or not in the "LOCATION_COMMON_FILES"
Previously (version 9.x), it seems that the "getFile" function fire a try catch error in the file does not exists.
But it seems that it's not the case any more in 10.1.18 cloud edition
Any help ?
Thx in davance
Christian
Nikita Martyanov on
Hello Christian,
Since getFile returns an array of bytes the most simple way is to check its lenght. If length equals 0, then file doesn't exist.
---
BR, Nikita