src/Adapter/FileCache.php
protected function createNamespace()
    {
        $dir = $this->getPath();
        if (! file_exists($dir) || ! is_dir($dir)) {
            set_error_handler(function () {
                throw new Exception('An error occurred.');
            }, E_WARNING);
            try {
                mkdir($dir, $this->dirPermissions, true);
            } catch (Exception $ex) {
                restore_error_handler();
                throw new RuntimeException(
                    sprintf('Failed to create cache directory "%s".', $dir)
                );
            }
            restore_error_handler();
        }
        if (! is_writable($dir)) {
            throw new RuntimeException(
                sprintf('The cache directory "%s" is not writable.', $dir)
            );
        }
        if (! is_readable($dir)) {
            throw new RuntimeException(
                sprintf('The cache directory "%s" is not readable.', $dir)
            );
        }
    }
protected function createNamespace()
    {
        $dir = $this->getPath();
        if (! file_exists($dir) || ! is_dir($dir)) {
            set_error_handler(function () {
                throw new Exception('An error occurred.');
            }, E_WARNING);
            try {
                mkdir($dir, $this->dirPermissions, true);
            } catch (Exception $ex) {
                restore_error_handler();
                throw new RuntimeException(
                    sprintf('Failed to create cache directory "%s".', $dir)
                );
            }
            restore_error_handler();
        }
        if (! is_writable($dir)) {
            throw new RuntimeException(
                sprintf('The cache directory "%s" is not writable.', $dir)
            );
        }
        if (! is_readable($dir)) {
            throw new RuntimeException(
                sprintf('The cache directory "%s" is not readable.', $dir)
            );
        }
    }
protected function createNamespace ( ) { $ dir = $ this -> getPath ( ) ; if ( ! file_exists ( $ dir ) || ! is_dir ( $ dir ) ) { set_error_handler ( function ( ) { throw new Exception ( 'An error occurred.' ) ; } , E_WARNING ) ; try { mkdir ( $ dir , $ this -> dirPermissions , true ) ; } catch ( Exception $ ex ) { restore_error_handler ( ) ; throw new RuntimeException ( sprintf ( 'Failed to create cache directory "%s".' , $ dir ) ) ; } restore_error_handler ( ) ; } if ( ! is_writable ( $ dir ) ) { throw new RuntimeException ( sprintf ( 'The cache directory "%s" is not writable.' , $ dir ) ) ; } if ( ! is_readable ( $ dir ) ) { throw new RuntimeException ( sprintf ( 'The cache directory "%s" is not readable.' , $ dir ) ) ; } }
Creates directory for current namespace if not exists.

@throws RuntimeException

- If unable to create the directory for specified namespace.
- If the directory for specified namespace exists, but not writable.
- If the directory for specified namespace exists, but not readable.
Creates directory for current namespace if not exists .