I need to get Drupal to list all its files and their management status for debugging purposes. It seems like there must be a simple way to print the list of managed files, right? How is this done?
1 Answer
There is at least 1 issue queue item looking to add "reporting" to the Media module, such as show me where this file is used on the site.
If you're using Drush. Look at drush sql-cli
and a query such as select fid, filename from file_managed where status = 1
-
This is correct. It turns out I asked the wrong question, because I wanted to look at the file usage table instead, but this is still helpful because I didn't know about drush sql-cli before this.– bethCommented Jan 4, 2013 at 17:41
-
1see this issue regarding tracking asset usage on a site. drupal.org/node/1599460– tenkenCommented Jan 4, 2013 at 19:18
-
So, this is great, but is there really no API call that returns a list of files?– bethCommented Jan 18, 2013 at 22:56
-
2
-