Does this specifically refer to files in /tmp ? Or whatever I set as my temporary folder? Or will it possibly delete "unused" files?
I ask, because I use file_save_data to save files. And I'm worried that Drupal at some points decides to delete some of these files, as they won't be referenced anywhere except in my own custom table.
Files uploaded to managed files will be set as temporary. You need to set the file status as permanent, and add a usage, to prevent the file from being deleted.
This will add a 'usage' for the file. When deleted, you need to remove the file usage. Files that have been set to permanent, and have a file usage applied, will not be deleted.
Not the answer you're looking for? Browse other questions tagged 8 files media or ask your own question.
Will managed files be deleted if no corresponding entry exists in file_usage?
How to list all managed files?
How would files be uploaded to a 2nd domain?