bool zipClue( string zip_file, string src_path, bool isDeleteSrc, string password )
{
string cmd;
char buffer[1024]={0};
if(zip_file.empty()|| src_path.empty())
{
return false;
}
if( access( (char*)src_path.c_str(),0) != 0 )
{
printf("not exist...(%s)\n", src_path.c_str() );
return false;
}
string tarzip=zip_file;
zip_file.append(".ty");
// zip -P 123 -r -m t4.zip 111/DOMAIN_temp/
// zip -q -u -P 123 -r t6.zip t4/
cmd="zip -q ";
if( !password.empty() )
{
cmd+="-P "+password;
}
cmd+=" -rj ";
if( isDeleteSrc )
{
cmd+=" -m ";
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载