You are here

function file_aliases_file_delete in File Aliases 7

Implements hook_file_delete().

Parameters

$file:

File

./file_aliases.module, line 183
Contains core functions for the File Aliases module.

Code

function file_aliases_file_delete($file) {
  $alias = "file_aliases/{$file->fid}";
  if (drupal_get_path_alias($alias)) {
    $path = path_load($alias);
    path_delete($path['pid']);
  }
}