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/module-remote-storage/Model/Filesystem/Directory/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

namespace Magento\RemoteStorage\Model\Filesystem\Directory;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem\Directory\PathValidatorInterface;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Framework\Filesystem\DriverInterface;
use Magento\RemoteStorage\Driver\DriverPool;
use Magento\RemoteStorage\Filesystem;

/**
 * Remote storage write class
 */
class Write extends \Magento\Framework\Filesystem\Directory\Write
{
    /**
     * @var WriteInterface
     */
    private $localDirectoryWrite;

    /**
     * Write constructor.
     *
     * @param \Magento\Framework\Filesystem\File\WriteFactory $fileFactory
     * @param DriverInterface $driver
     * @param string $path
     * @param Filesystem $filesystem
     * @param int|null $createPermissions
     * @param PathValidatorInterface|null $pathValidator
     * @param string $directoryCode
     * @throws \Magento\Framework\Exception\FileSystemException
     */
    public function __construct(
        \Magento\Framework\Filesystem\File\WriteFactory $fileFactory,
        DriverInterface $driver,
        $path,
        Filesystem $filesystem,
        ?int $createPermissions = null,
        ?PathValidatorInterface $pathValidator = null,
        ?string $directoryCode = DirectoryList::PUB
    ) {
        parent::__construct($fileFactory, $driver, $path, $createPermissions, $pathValidator);
        $this->localDirectoryWrite = $filesystem->getDirectoryWrite(
            $directoryCode,
            DriverPool::FILE
        );
    }

    /**
     * @inheritDoc
     */
    public function delete($path = null)
    {
        $deleted = parent::delete($path);
        if ($deleted) {
            $deleted = $this->localDirectoryWrite->delete($path);
        }
        return $deleted;
    }
}

Spamworldpro Mini