芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php
path = $path; $this->files = $files; $this->minutes = $minutes; } /** * {@inheritdoc} */ public function open($savePath, $sessionName) { return true; } /** * {@inheritdoc} */ public function close() { return true; } /** * {@inheritdoc} */ public function read($sessionId) { if ($this->files->isFile($path = $this->path.'/'.$sessionId)) { if ($this->files->lastModified($path) >= Carbon::now()->subMinutes($this->minutes)->getTimestamp()) { return $this->files->sharedGet($path); } } return ''; } /** * {@inheritdoc} */ public function write($sessionId, $data) { $this->files->put($this->path.'/'.$sessionId, $data, true); return true; } /** * {@inheritdoc} */ public function destroy($sessionId) { $this->files->delete($this->path.'/'.$sessionId); return true; } /** * {@inheritdoc} */ public function gc($lifetime) { $files = Finder::create() ->in($this->path) ->files() ->ignoreDotFiles(true) ->date('<= now - '.$lifetime.' seconds'); foreach ($files as $file) { $this->files->delete($file->getRealPath()); } } }