made some refactoring

This commit is contained in:
2025-07-09 05:28:39 +03:00
parent f76eb08fe0
commit 38676bc9fd
69 changed files with 3075 additions and 355 deletions

View File

@@ -0,0 +1,32 @@
<?php
/**
* @package: patterns
* @author: Yevhen Odynets
* @date: 2025-07-07
* @time: 02:48
*/
declare(strict_types = 1);
$c = 0;
$ite = new RecursiveDirectoryIterator('k:\tmp\faker_dir');
//$ite = new RecursiveDirectoryIterator('c:\tmp\Laracasts\Languages');
//$ite = new RecursiveDirectoryIterator('w:\tmp\Laracasts\Languages\PHP');
foreach (new RecursiveIteratorIterator($ite) as $filename => $cur) {
$pathInfo = pathinfo($filename);
if ($pathInfo['extension'] !== 'mp4') {
continue;
}
$lnkFile = $filename . '.LNK';
if (! file_exists($lnkFile)) {
symlink($filename, $lnkFile);
}
if (file_exists($lnkFile)) {
echo "<p>deleted $filename</p>";
//unlink($filename);
}
}