public function setDirectory($directory)
    {
        if (!is_dir($directory) && !is_writable($directory)) {
            throw new FileCacheException(
                sprintf('The directory "%s" is not directory and not writable', $directory)
            );
        }

        if (is_null($directory) && !$this->getFilesystem()->mkdir($directory, 0777, true)) {
            throw new FileCacheException(
                sprintf('The directory "%s" not be null and directory not be created')
            );
        }

        $this->directory = realpath($directory);
    }
public function setDirectory($directory)
    {
        if (!is_dir($directory) && !is_writable($directory)) {
            throw new FileCacheException(
                sprintf('The directory "%s" is not directory and not writable', $directory)
            );
        }

        if (is_null($directory) && !$this->getFilesystem()->mkdir($directory, 0777, true)) {
            throw new FileCacheException(
                sprintf('The directory "%s" not be null and directory not be created')
            );
        }

        $this->directory = realpath($directory);
    }
public function setDirectory ( $ directory ) { if ( ! is_dir ( $ directory ) && ! is_writable ( $ directory ) ) { throw new FileCacheException ( sprintf ( 'The directory "%s" is not directory and not writable' , $ directory ) ) ; } if ( is_null ( $ directory ) && ! $ this -> getFilesystem ( ) -> mkdir ( $ directory , 0777 , true ) ) { throw new FileCacheException ( sprintf ( 'The directory "%s" not be null and directory not be created' ) ) ; } $ this -> directory = realpath ( $ directory ) ; }
Set the directory to store you're cache

@param string|__DIR__ $directory

@throws \Mozart\Library\Cache\Exception\FileCacheException
Set the directory to store you re cache