🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::CompressorImplTar类 参考

#include <CompressorImplTar.hpp>

+ 类 ast::CompressorImplTar 继承关系图:

Public 成员函数

virtual errc_t compress (StringView source, StringView target, StringView curdir={}) const override
 
virtual bool canCompress (StringView source, StringView target) const override
 
- Public 成员函数 继承自 ast::CompressorInterface
virtual bool isSupported () const
 

静态 Public 成员函数

static CompressorImplTarInstance ()
 

详细描述

纯 C++ TAR 写入后端

从头实现 TAR 归档文件写入,不依赖任何第三方库。 支持 USTAR 格式。仅生成未压缩的 .tar 文件。

成员函数说明

◆ canCompress()

bool ast::CompressorImplTar::canCompress ( StringView source,
StringView target ) const
overridevirtual

检查该压缩实现是否能处理指定源文件/目录并生成目标格式

默认返回 true;子类可重写以检查目标扩展名或源文件类型

参数
source待压缩的源文件或目录路径
target压缩目标路径(用于判断目标格式)
返回
true 如果能处理,false 否则

重载 ast::CompressorInterface .

◆ compress()

errc_t ast::CompressorImplTar::compress ( StringView source,
StringView target,
StringView curdir = {} ) const
overridevirtual

压缩文件或目录

参数
source要压缩的文件或目录的路径
target压缩目标路径
curdir工作目录,source 在归档中的路径相对于此目录计算 (空串=从 source 父目录推断;等于 source=归档根为".")
返回
errc_t 错误码

实现了 ast::CompressorInterface.


该类的文档由以下文件生成: