mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 06:45:39 +08:00
refactor to pkg-config and add some add-on libs for gd
This commit is contained in:
@@ -169,8 +169,8 @@ class FileSystem
|
||||
break;
|
||||
// case 'zstd':
|
||||
// case 'zst':
|
||||
// passthru('cat ' . $filename . ' | zstd -d | tar -x -C ".SOURCE_PATH . "/' . $name . ' --strip-components 1', $ret);
|
||||
// break;
|
||||
// passthru('cat ' . $filename . ' | zstd -d | tar -x -C ".SOURCE_PATH . "/' . $name . ' --strip-components 1', $ret);
|
||||
// break;
|
||||
case 'tar':
|
||||
f_passthru("tar -xf {$filename} -C " . SOURCE_PATH . "/{$name} --strip-components 1");
|
||||
break;
|
||||
@@ -408,4 +408,17 @@ class FileSystem
|
||||
}
|
||||
return file_put_contents($path, $content, ...$args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset (remove recursively and create again) dir
|
||||
*
|
||||
* @throws FileSystemException
|
||||
*/
|
||||
public static function resetDir(string $dir_name): void
|
||||
{
|
||||
if (is_dir($dir_name)) {
|
||||
self::removeDir($dir_name);
|
||||
}
|
||||
self::createDir($dir_name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user