| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public static function checkIfFileExists($filename, $fileExtension = '.dat') |
||
| 40 | { |
||
| 41 | if (file_exists($filename.$fileExtension)) { |
||
| 42 | Text::message('File '.$filename.$fileExtension.' exists and it will be overwritten!'); |
||
| 43 | |||
| 44 | Input::dieOnDenyUserConfirm(); |
||
| 45 | |||
| 46 | // Empty the file |
||
| 47 | file_put_contents($filename.$fileExtension, ''); |
||
| 48 | } |
||
| 51 |