1 file.inc file_load($fid)

Loads a single file entity from the database.

Parameters

$fid: A file ID.

Return value

File: A file entity or FALSE if the file was not found.

See also

hook_file_load()

file_load_multiple()

Related topics

File

core/includes/file.inc, line 623
API for handling file uploads and server file management.

Code

function file_load($fid) {
  $files = file_load_multiple(array($fid), array());
  return reset($files);
}