| 1 | <?php  | 
            ||
| 19 | class FileHelper  | 
            ||
| 20 | { | 
            ||
| 21 | /**  | 
            ||
| 22 | * Writes given content to the file.  | 
            ||
| 23 | * Doesn't touch file if it has exactly same content.  | 
            ||
| 24 | * Creates intermediate directories when necessary.  | 
            ||
| 25 | * @param string $path  | 
            ||
| 26 | * @param string $content  | 
            ||
| 27 | * @return bool true if file was changed  | 
            ||
| 28 | */  | 
            ||
| 29 | 5 | public static function write($path, $content)  | 
            |
| 42 | |||
| 43 | /**  | 
            ||
| 44 | * Creates directory if not exists.  | 
            ||
| 45 | * Creates intermediate directories when necessary.  | 
            ||
| 46 | * @param string $path  | 
            ||
| 47 | * @return bool true if directory did not exist and was created  | 
            ||
| 48 | */  | 
            ||
| 49 | 5 | public static function mkdir($path)  | 
            |
| 62 | }  | 
            ||
| 63 |