public static function purge($path, $fileFilterRegex = null, $dirFilterRegex = null)
    {
        Path::validatePath($path);

        $iterator = new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS);
        $iterator = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST);

        foreach ((array) $fileFilterRegex as $regex) {
            $iterator = new FileRegexIterator($iterator, $regex);
        }

        foreach ((array) $dirFilterRegex as $regex) {
            $iterator = new DirectoryRegexIterator($iterator, $regex);
        }

        foreach ($iterator as $file) {
            if ($file->isDir()) {
                Path::delete($file->getPathName());
                continue;
            }
            File::delete($file->getPathname());
        }
    }