Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function getFileInfo($path) |
||
27 | { |
||
28 | $file = $this->root.$path; |
||
29 | |||
30 | if (!file_exists($file)) { |
||
31 | $file = $this->root.'templates/_head.html.php'; |
||
32 | } |
||
33 | |||
34 | return [ |
||
35 | 'name' => str_replace($this->root, '', $file), |
||
36 | 'content' => file_get_contents($file), |
||
37 | 'last-modified' => date("Y-m-d H:i:s", filemtime($file)), |
||
38 | 'size' => filesize($file), |
||
39 | 'perms' => decoct(fileperms($file) & 0777), |
||
40 | ]; |
||
41 | } |
||
42 | |||
54 |