Quantcast
Channel: 睿论坛 - 最新话题
Viewing all articles
Browse latest Browse all 5732

文件权限问题

$
0
0

@Micro_yangs wrote:

请教一下一个基于 TCP/UDP 聊天类的demo 由于有点时候会用到备份历史消息(图片+文字)方式,至于文字可以直接读数据库,而图片就是压缩上传的方式,网上搜了下使用ssziparchive这个框架对图片进行压缩操作,压缩后的文件我放到了当前的沙箱目录下,但是目前出现一个问题就是压缩后的图片还原后出现了程序读不了文件。

Permission denie
: [V][][, , 0][open file error:13 Permission denied, path:/var/mobile/Containers/Data/Application/7DD5E06C-C31C-465E-AF1A-957A2ED6A341/Library/pic/1.jpg

我表示奇了怪了 :joy:,难道非让我用wifi下循环遍历上传图片么=。= 麻烦懂的人赐教下。

压缩使用的是:
createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath withPassword:(nullable NSString *)password 方法。

解压使用的是:
unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination overwrite:(BOOL)overwrite password:(nullable NSString *)password error:(NSError **)error 方法。

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5732

Trending Articles