This is my case:
I have a discord bot that saves a bunch of mp3s that it downloads via YoutubeDL from user input. Because the hoster resets daily, these files would only be temporary on the hoster. To solve this i am using the Python Library for the Dropbox API.
Every time the bot starts, i tell it to download all the files in a specified Dropbox Folder, and heres where my problem lies:
Because i the restarts of the hosters arent always at a set time, i want the bot to upload (aka backup) the files as soon as a new file is added. For simplicity, i would just tell it to upload all the files in the folder, but before i do this i want to make sure - will this result in the bot uploading EVERY FILE and overwriting the old, identical ones, or will the API see that a file is already present, and skip it - ideally with a catchable error? If the first is the case i will have to add code to compare the Dropbox files to the local ones, but if its the later i can save my time and just throw all the files at it.
I tested it and the "modified" timestamp didnt change for the identical files, but the script took kinda long so i wanna be sure