How to perform action after a file is deleted? Is there an API hook I could use to run some custom PHP code after a file is deleted? I need access to the name of the file which has just been deleted.

I attempted using hook_nodeapi, and testing for when the operation is delete, but it seems by this stage the file row has been removed from the database, and I'm left with just information about the node itself.

I'm using Drupal 6. (I see that Drupal 7 does have a hook: hook_file_delete)
I believe you can use FileField; this module is now part of Drupal 7 core, and provides additions to the API, such as hook_file_delete().