file->move($save_dir, $this->fileName); if (empty($info)) { $this->error = $this->file->getError(); return false; } return true; } public function fetch($url, $key=null) {} /** * 删除文件 * @param $fileName * @return bool|mixed */ public function delete($fileName) { // 文件所在目录 $filePath = public_path() . "/{$fileName}"; return !file_exists($filePath) ?: unlink($filePath); } /** * 返回文件路径 * @return mixed */ public function getFileName() { return $this->fileName; } }