1 file.file.inc file_file_type($file)

Implements hook_file_type().

File

core/modules/file/file.file.inc, line 25
File hooks implemented by the Fil module.

Code

function file_file_type($file) {
  $types = array();
  foreach (file_type_get_types() as $type) {
    if (file_match_mimetypes($type->mimetypes, $file->filemime)) {
      $types[] = $type->type;
    }
  }

  return $types;
}