@@ -63,6 +63,8 @@ public function __construct(Cache $config)
63
63
64
64
$ this ->mode = $ config ->file ['mode ' ] ?? 0640 ;
65
65
$ this ->prefix = $ config ->prefix ;
66
+
67
+ helper ('filesystem ' );
66
68
}
67
69
68
70
/**
@@ -96,7 +98,7 @@ public function save(string $key, $value, int $ttl = 60)
96
98
'data ' => $ value ,
97
99
];
98
100
99
- if ($ this -> writeFile ($ this ->path . $ key , serialize ($ contents ))) {
101
+ if (write_file ($ this ->path . $ key , serialize ($ contents ))) {
100
102
try {
101
103
chmod ($ this ->path . $ key , $ this ->mode );
102
104
@@ -176,15 +178,15 @@ public function decrement(string $key, int $offset = 1)
176
178
*/
177
179
public function clean ()
178
180
{
179
- return $ this -> deleteFiles ($ this ->path , false , true );
181
+ return delete_files ($ this ->path , false , true );
180
182
}
181
183
182
184
/**
183
185
* {@inheritDoc}
184
186
*/
185
187
public function getCacheInfo ()
186
188
{
187
- return $ this -> getDirFileInfo ($ this ->path );
189
+ return get_dir_file_info ($ this ->path );
188
190
}
189
191
190
192
/**
@@ -251,6 +253,8 @@ protected function getItem(string $filename)
251
253
/**
252
254
* Writes a file to disk, or returns false if not successful.
253
255
*
256
+ * @deprecated 4.6.1 Use `write_file()` instead.
257
+ *
254
258
* @param string $path
255
259
* @param string $data
256
260
* @param string $mode
@@ -283,6 +287,8 @@ protected function writeFile($path, $data, $mode = 'wb')
283
287
* If the second parameter is set to TRUE, any directories contained
284
288
* within the supplied base directory will be nuked as well.
285
289
*
290
+ * @deprecated 4.6.1 Use `delete_files()` instead.
291
+ *
286
292
* @param string $path File path
287
293
* @param bool $delDir Whether to delete any directories found in the path
288
294
* @param bool $htdocs Whether to skip deleting .htaccess and index page files
@@ -318,6 +324,8 @@ protected function deleteFiles(string $path, bool $delDir = false, bool $htdocs
318
324
*
319
325
* Any sub-folders contained within the specified path are read as well.
320
326
*
327
+ * @deprecated 4.6.1 Use `get_dir_file_info()` instead.
328
+ *
321
329
* @param string $sourceDir Path to source
322
330
* @param bool $topLevelOnly Look only at the top level directory specified?
323
331
* @param bool $_recursion Internal variable to determine recursion status - do not use in calls
@@ -360,6 +368,8 @@ protected function getDirFileInfo(string $sourceDir, bool $topLevelOnly = true,
360
368
* Options are: name, server_path, size, date, readable, writable, executable, fileperms
361
369
* Returns FALSE if the file cannot be found.
362
370
*
371
+ * @deprecated 4.6.1 Use `get_file_info()` instead.
372
+ *
363
373
* @param string $file Path to file
364
374
* @param array|string $returnedValues Array or comma separated string of information returned
365
375
*
0 commit comments