file_download()
drupal/includes/file.inc, line 485
Call modules to find out if a file is accessible for a given user.
| Name | Description |
|---|---|
| File interface | Common file handling functions. |
function file_download() {
$file = $_GET['file'];
if (file_exists(file_create_path($file))) {
$list = module_list();
foreach ($list as $module) {
$headers = module_invoke($module, 'file_download', $file);
if ($headers === -1) {
drupal_access_denied();
}
elseif (is_array($headers)) {
file_transfer($file, $headers);
}
}
}
drupal_not_found();
}