* [misc] add updateDownloadingTagFile.

This commit is contained in:
qixinzhi
2024-07-08 13:16:59 +08:00
committed by 刘刚
parent bcfaf5a5da
commit 138eaeee8a
+20
View File
@@ -249,6 +249,26 @@ class installZen extends install
return is_dir($dataRoot) && is_writable($dataRoot) ? 'ok' : 'fail';
}
protected function updateDownloadingTagFile($type = 'file', $action = 'create'): string
{
$this->loadModel('bi');
$downloading = '.downloading';
$binRoot = $this->app->getTmpRoot() . 'duckdb' . DS;
$duckdbBin = $this->bi->getDuckdbBinConfig();
$file = $binRoot . $duckdbBin[$type];
$tagFile = $file . $downloading;
if($action == 'create')
{
if(file_exists($tagFile)) return 'fail';
file_put_contents($tagFile, 'Downloading...');
return 'ok';
}
return 'ok';
}
protected function unzipFile($path, $file): bool
{
/* 解压文件到指定目录。 */