src/Registry/Adapter/FileSystemAdapter.php
protected function ensureDirectory(string $directory): void
    {
        if (!is_dir($directory)) {
            $success = @mkdir($directory, 0775, true);
            if (!$success && !is_dir($directory)) {
                throw new ExportDataException('Unable to create directory ' . $directory . '.');
            }
        }

        if (!is_writable($directory)) {
            throw new ExportDataException('Directory ' . $directory . ' is not writable.');
        }
    }
protected function ensureDirectory(string $directory): void
    {
        if (!is_dir($directory)) {
            $success = @mkdir($directory, 0775, true);
            if (!$success && !is_dir($directory)) {
                throw new ExportDataException('Unable to create directory ' . $directory . '.');
            }
        }

        if (!is_writable($directory)) {
            throw new ExportDataException('Directory ' . $directory . ' is not writable.');
        }
    }
protected function ensureDirectory ( string $ directory ) : void { if ( ! is_dir ( $ directory ) ) { $ success = @ mkdir ( $ directory , 0775 , true ) ; if ( ! $ success && ! is_dir ( $ directory ) ) { throw new ExportDataException ( 'Unable to create directory ' . $ directory . '.' ) ; } } if ( ! is_writable ( $ directory ) ) { throw new ExportDataException ( 'Directory ' . $ directory . ' is not writable.' ) ; } }
Ensures that the specified directory is available and writable.
@param string $directory
@throws ExportDataException
Ensures that the specified directory is available and writable .