Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/ift/vendor/consolidation/robo/src/Task/File/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/ift/vendor/consolidation/robo/src/Task/File/TmpFile.php

<?php

namespace Robo\Task\File;

use Robo\Contract\CompletionInterface;

/**
 * Create a temporary file that is automatically cleaned up
 * once the task collection is is part of completes. When created,
 * it is given a random filename.
 *
 * This temporary file may be manipulated exacatly like taskWrite().
 * It is deleted as soon as the collection it is a part of completes
 * or rolls back.
 *
 * ``` php
 * <?php
 * $collection = $this->collectionBuilder();
 * $tmpFilePath = $collection->taskTmpFile()
 *      ->line('-----')
 *      ->line(date('Y-m-d').' '.$title)
 *      ->line('----')
 *      ->getPath();
 * $collection->run();
 * ?>
 * ```
 */
class TmpFile extends Write implements CompletionInterface
{
    /**
     * @param string $filename
     * @param string $extension
     * @param string $baseDir
     * @param bool $includeRandomPart
     */
    public function __construct($filename = 'tmp', $extension = '', $baseDir = '', $includeRandomPart = true)
    {
        if (empty($baseDir)) {
            $baseDir = sys_get_temp_dir();
        }
        if ($includeRandomPart) {
            $random = static::randomString();
            $filename = "{$filename}_{$random}";
        }
        $filename .= $extension;
        parent::__construct("{$baseDir}/{$filename}");
    }

    /**
     * Generate a suitably random string to use as the suffix for our
     * temporary file.
     *
     * @param int $length
     *
     * @return string
     */
    private static function randomString($length = 12)
    {
        return substr(str_shuffle('23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'), 0, $length);
    }

    /**
     * Delete this file when our collection completes.
     * If this temporary file is not part of a collection,
     * then it will be deleted when the program terminates,
     * presuming that it was created by taskTmpFile() or _tmpFile().
     */
    public function complete()
    {
        unlink($this->getPath());
    }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net