Created function getFiles and getFile on files.php