public function export($csvType, $id, $tao_arr) { if ($csvType == 'goods_csv') { $this->getInstance($csvType); $this->csv->export($id); $this->DownLoad(); //生成并下载压缩文件 IFile::clearDir('backup/goods'); //删除goods文件夹下的所有文件 return 0; } if ($csvType == 'taobao_csv') { $this->getInstance($csvType); return $this->csv->export($id, $tao_arr); } }
/** * @brief 删除全部缓存 * @return bool true:成功;false:失败; */ public function flush() { return IFile::clearDir($this->cachePath); }
function clearCache() { $runtimePath = $this->module->getRuntimePath(); $result = IFile::clearDir($runtimePath); if ($result == true) { echo 1; } else { echo -1; } }
function clearCache() { $runtimePath = IWeb::$app->getBasePath() . 'runtime'; $result = IFile::clearDir($runtimePath); if ($result == true) { echo 1; } else { echo -1; } }
function savetempset() { $tempname = IFilter::act(IReq::get('modulename')); if (empty($tempname)) { $this->message('模板名称不能为空'); } $logindir = hopedir . '/templates'; if (!file_exists($logindir . '/' . $tempname . '/stro.txt')) { $this->message('模板文件不存在'); } $siteinfo['sitetemp'] = $tempname; $config = new config('hopeconfig.php', hopedir); $config->write($siteinfo); IFile::clearDir('templates_c'); $this->success('操作成功'); }
function debkfile() { $dirname = IReq::get('dirname'); if (empty($dirname)) { $this->message('文件名为空'); } IFile::clearDir(hopedir . '/dbbak/' . $dirname); IFile::rmdir(hopedir . '/dbbak/' . $dirname); $this->success('操作成功! '); }