Library/Compiler.php
private function recursiveDeletePath($path, $mask)
    {
        if (!file_exists($path) || !is_dir($path) || !is_readable($path)) {
            $this->logger->warning("Directory '{$path}' is not readable. Skip...");

            return;
        }

        $objects = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($path),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        foreach ($objects as $name => $object) {
            if (preg_match($mask, $name)) {
                @unlink($name);
            }
        }
    }
private function recursiveDeletePath($path, $mask)
    {
        if (!file_exists($path) || !is_dir($path) || !is_readable($path)) {
            $this->logger->warning("Directory '{$path}' is not readable. Skip...");

            return;
        }

        $objects = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($path),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        foreach ($objects as $name => $object) {
            if (preg_match($mask, $name)) {
                @unlink($name);
            }
        }
    }
private function recursiveDeletePath ( $ path , $ mask ) { if ( ! file_exists ( $ path ) || ! is_dir ( $ path ) || ! is_readable ( $ path ) ) { $ this -> logger -> warning ( "Directory '{$path}' is not readable. Skip..." ) ; return ; } $ objects = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ path ) , \ RecursiveIteratorIterator :: SELF_FIRST ) ; foreach ( $ objects as $ name => $ object ) { if ( preg_match ( $ mask , $ name ) ) { @ unlink ( $ name ) ; } } }
Recursively deletes files in a specified location.

@deprecated

@param string $path Directory to deletes files
@param string $mask Regular expression to deletes files
Recursively deletes files in a specified location .