Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/magento/framework/Console/Exception/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/vendor/magento/framework/Console/Exception/GenerationDirectoryAccessException.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Framework\Console\Exception;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Phrase;

/**
 * The default exception for missing write permissions on compilation generated folder.
 */
class GenerationDirectoryAccessException extends FileSystemException
{
    /**
     * @inheritdoc
     */
    public function __construct(Phrase $phrase = null, \Exception $cause = null, $code = 0)
    {
        $phrase = $phrase ?: new Phrase(
            'Command line user does not have read and write permissions on '
            . $this->getDefaultDirectoryPath(DirectoryList::GENERATED) . ' directory. '
            . 'Please address this issue before using Magento command line.'
        );

        parent::__construct($phrase, $cause, $code);
    }

    /**
     * Get default directory path by code
     *
     * @param string $code
     * @return string
     */
    private function getDefaultDirectoryPath($code)
    {
        $config = DirectoryList::getDefaultConfig();
        $result = '';

        if (isset($config[$code][DirectoryList::PATH])) {
            $result = $config[$code][DirectoryList::PATH];
        }

        return $result;
    }
}

Spamworldpro Mini