iphone - How to store a zip file in document directory? -


i working on webservice based app, in after calling web service method response zip file , have store zip file document directory folder. please explain me how it. thank in advance.

you can store zip in document directory using bellow code:-

 nsarray *path = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes);                            nsstring *documentdirectory = [path objectatindex:0];                            nsstring *setpath = [documentdirectory stringbyappendingpathcomponent:filname.zip];                            nsdata *data = .... // zip data                            [data writetofile:setpath atomically:yes encoding:nsutf8stringencoding error:nil]; 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -