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?

1 Answer 1

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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