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
Post a Comment