문제

My idea: syncing music without wifi or bluetooth. First I get the the files I want , then I compress them into a zip file. Then I want to rename the extension JPG, so the iPad can recognize the file. Then I copy it to my sd card, then use camera connection kit to connect it to my iPad.

I wanted my app to copy the entire jpg form dcim so that I can change the file extension back to zip,then extract it to retire my files.

But so far I have only found a way to copy the picture, not the entire file. I need the entire file, which I wish you guys can help me.

Thanks in advance,

도움이 되었습니까?

해결책

You can use NSFileManager's copyItemAtPath method like so:

NSError *error;
[[NSFileManager defaultManager] copyItemAtPath:sourceFile toPath:destFile error:&error];

Where sourceFile would be the complete path to your jpg file, and destFile would be the complete path to your zip file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top