file_load

Versions
7
file_load($fid)

Load a file object from the database.

See also

hook_file_load()

@see file_load_multiple()

Parameters

$fid A file ID.

Return value

A file object.

Related topics

▾ 6 functions call file_load()

file_managed_file_process in modules/file/file.module
Process function to expand the managed_file element type.
file_managed_file_validate in modules/file/file.module
An #element_validate callback for the managed_file element.
file_managed_file_value in modules/file/file.module
The #value_callback for a managed_file type element.
image_field_sanitize in modules/image/image.field.inc
Implements hook_field_sanitize().
system_cron in modules/system/system.module
Implements hook_cron().
template_preprocess_user_picture in modules/user/user.module
Process variables for user-picture.tpl.php.

Code

includes/file.inc, line 460

<?php
function file_load($fid) {
  $files = file_load_multiple(array($fid), array());
  return reset($files);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.