1 file.module file_type_load($name)

Menu argument loader: Loads a file type by string.


$name: The machine-readable name of a file type to load, where '_' is replaced with '-'.

Return value

stdClass|FALSE: A file type object or FALSE if $name does not exist.


core/modules/file/file.module, line 2299
Defines a "managed_file" Form API field and a "file" field for Field module.


function file_type_load($name) {
  return file_type_get_type(strtr($name, array('-' => '_')));