ForkCMS\Bundle\InstallerBundle\Service\RequirementsChecker::isRecursivelyWritable PHP Метод

isRecursivelyWritable() приватный Метод

.. are writable.
private isRecursivelyWritable ( string $path ) : boolean
$path string The path to check.
Результат boolean
    private function isRecursivelyWritable($path)
    {
        $path = rtrim((string) $path, '/');
        // check if path is writable
        if (!$this->isWritable($path)) {
            return false;
        }
        // loop child directories
        foreach ((array) scandir($path) as $file) {
            // no '.' and '..'
            if ($file != '.' && $file != '..') {
                // directory
                if (is_dir($path . '/' . $file)) {
                    // check if children are readable
                    if (!$this->isRecursivelyWritable($path . '/' . $file)) {
                        return false;
                    }
                }
            }
        }
        // we were able to read all sub-directories
        return true;
    }