2

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?

2

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

|improve this answer|||||
  • 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. – beth Jan 4 '13 at 17:41
  • 1
    see this issue regarding tracking asset usage on a site. drupal.org/node/1599460 – tenken Jan 4 '13 at 19:18
  • So, this is great, but is there really no API call that returns a list of files? – beth Jan 18 '13 at 22:56
  • 1
  • There we go, that's what I was looking for. Thank you! – beth Jan 22 '13 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.