Example #1
0
 public function __construct($prefix = 'tmp', $base = '', $includeRandomPart = true)
 {
     if (empty($base)) {
         $base = sys_get_temp_dir();
     }
     if ($includeRandomPart) {
         $random = static::randomString();
         $prefix = "{$prefix}_{$random}";
     }
     parent::__construct(["{$base}/{$prefix}"]);
 }
Example #2
0
File: TmpDir.php Project: jjok/Robo
 /**
  * @param string $prefix
  * @param string $base
  * @param bool $includeRandomPart
  */
 public function __construct($prefix = 'tmp', $base = '', $includeRandomPart = true)
 {
     if (empty($base)) {
         $base = sys_get_temp_dir();
     }
     $path = "{$base}/{$prefix}";
     if ($includeRandomPart) {
         $path = static::randomLocation($path);
     }
     parent::__construct(["{$path}"]);
 }
Example #3
0
 public function __construct($dirs)
 {
     parent::__construct($dirs);
     $this->parentDir = getcwd();
 }