Updating Downloaded Files from Firebase Storage in Android App

I have an app where files are downloaded from Firebase, specifically from a folder in Storage called ‘PartiturasSAX’. I would like to add a condition that allows me to download only the files that have been updated in this particular folder in Firebase. Is it possible to achieve this? I’m looking for a code snippet that checks the local device folder, for example, ‘/storage/emulated/0/Download/.PartiturasSAX/’, to see if it contains the same version of the file as the one in the ‘PartiturasSAX’ folder in Firebase Storage.

I have created a block of code that checks if the file exists on the device, based on its name. If the file doesn’t exist on the device, it downloads it. However, sometimes I update the same file with the same name, and since the file already exists on the device, it doesn’t get updated.

*I’m Brazilian, sorry for my English