PHP code example of unreal4u / file-operations
1. Go to this page and download the library: Download unreal4u/file-operations library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
unreal4u / file-operations example snippets
tantiate a deleter in test mode
$fileDeleter = new unreal4u\FileOperations\fileDeleter(true);
$options = [
'pattern' => '/test\d{3}\.txt/',
];
$fileDeleter->constructFileList('testdir/', $options)->perform();