1 | <?php |
||
6 | class FileChangesHelper |
||
7 | { |
||
8 | /** |
||
9 | * Create the directory if it doesn't exist. Right:0775 |
||
10 | * @param $dirPath |
||
11 | * @return bool |
||
12 | */ |
||
13 | public static function createDirectory($dirPath){ |
||
19 | |||
20 | /** |
||
21 | * Write the file. The content is already in json. |
||
22 | * @param string $path |
||
23 | * @param string $msg |
||
24 | * @return void |
||
25 | */ |
||
26 | public static function writeFile($path,$msg){ |
||
31 | |||
32 | /** |
||
33 | * Save appointments with the timestamp in filename. |
||
34 | * @param string $filePath |
||
35 | * @param string $contents |
||
36 | * @return void |
||
37 | */ |
||
38 | public static function saveAppointmentsFileByHistory($filePath,$contents){ |
||
48 | |||
49 | /** |
||
50 | * Get the content from a file. |
||
51 | * @param $path |
||
52 | * @return string |
||
53 | */ |
||
54 | public static function getContentFile($path){ |
||
69 | |||
70 | /** |
||
71 | * Get the content from a json file by decoding. |
||
72 | * @param string $path |
||
73 | * @return mixed |
||
74 | */ |
||
75 | public static function getJsonContentFromFile($path){ |
||
79 | |||
80 | /** |
||
81 | * Get an file list of appointments by eventCode |
||
82 | * @param string $eventCode |
||
83 | * @param string $pathDir |
||
84 | * @return array |
||
85 | */ |
||
86 | public static function getFilesListHistoryAppointmentsByEventCode($eventCode,$pathDir){ |
||
96 | |||
97 | /** |
||
98 | * Get the last list of appointments. |
||
99 | * @param string $eventCode |
||
100 | * @param string $pathDir |
||
101 | * @return string |
||
102 | */ |
||
103 | public static function getTheLastAppointmentsSaved($eventCode,$pathDir){ |
||
107 | } |