iOS中解壓rar檔案

2021-08-15 10:19:43 字數 597 閱讀 3440

ios中解壓rar檔案,使用unrarkit框架解壓,框架github位址

使用pods匯入框架之後會報錯

這是因為沒有匯入依賴框架libc++.bdt,匯入之後編譯一下即可

然後**中

/** 解壓 */

- (void)extract

nserror *error = nil;

nsarray *filenames = [archive listfilenames:&error];

if (error)

for (nsstring *filename in filenames)

nsdata *data = [archive extractdatafromfile:filenames[0] progress:nil error:&error];

if (error)

}if (data != nil)

}

如果要儲存檔案,可以在

if (data != nil) 

Linux中解壓rar檔案

root localhost rar ls acknow.txt license.txt order.htm rarfiles.lst rar.txt unrar default sfx makefile rar rar static readme.txt whatsnew.txt root loc...

linux中解壓rar檔案

plain view plain copy root localhost rar ls acknow.txt license.txt order.htm rarfiles.lst rar.txt unrar default.sfx makefile rar rar static readme.txt...

Linux中解壓rar檔案

root localhost rar ls acknow.txt license.txt order.htm rarfiles.lst rar.txt unrar default sfx makefile rar rar static readme.txt whatsnew.txt root loc...