PHP: Simple directory recursion
Keep running into scenarios where I need to scan through a file system and it’s actually pretty simple if you just know what classes to use. So… note to self and others: // This should return false if...
View ArticlePowerShell: Search for and delete files recursively
Short and simple, but keep forgetting some minor details, so… note to self… # Files gci -recurse -force | where {$_.name -eq "Thumbs.db"} | foreach {ri $_.fullname -whatif} # Directories (and using...
View ArticlePHP: Delete directory recursively
function delete_directory($dir) { if( ! file_exists($dir)) return; $it = new RecursiveDirectoryIterator($dir); $it = new RecursiveIteratorIterator($it,...
View ArticlePHP: Pathable RecursiveIteratorIterator
Needed to recursively loop through a multi-dimensional array and print out each leaf-node with its full “path”. For this I used an RecursiveArrayIterator for the array and a RecursiveIteratorIterator...
View Article
More Pages to Explore .....