/** * Get a runtime directory. * * Defaults to `/psysh` inside the system's temp dir. * * @return string */ public static function getRuntimeDir() { $xdg = new Xdg(); return $xdg->getRuntimeDir(false) . '/psysh'; }
/** * Get the shell's temporary directory location. * * Defaults to `/psysh` inside the system's temp dir unless explicitly * overridden. * * @return string */ public function getRuntimeDir() { if (!isset($this->runtimeDir)) { $xdg = new Xdg(); $this->runtimeDir = $xdg->getRuntimeDir() . '/psysh'; } if (!is_dir($this->runtimeDir)) { mkdir($this->runtimeDir, 0700, true); } return $this->runtimeDir; }
/** * @return string */ public function getRuntimeDir() { return $this->xdg->getRuntimeDir(false); }