1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
download-manager/file-information.php
2015-06-22 11:10:24 +01:00

15 lines
No EOL
457 B
PHP

<?php
define("INFORMATION_FILE", "private/information.yml");
function generate_file_object($file_name) {
$information_file = fopen(INFORMATION_FILE, "r") or die("Unable to open information file!");
$information = yaml_parse(fread($information_file, filesize(INFORMATION_FILE)))[strtolower($file_name)];
$file = array(
"file name" => $file_name,
"name" => $information["name"],
"description" => $information["description"]
);
return $file;
}
?>