Saturday, 15 September 2012

iphone - how to get URL Path for directory inside Document directory? -



iphone - how to get URL Path for directory inside Document directory? -

how can url path particular directory within document directory.

like document/art/

my code

- (nsurl *)localroot { if (_localroot != nil) { homecoming _localroot; } nsarray * paths = [[nsfilemanager defaultmanager] urlsfordirectory:nsdocumentdirectory indomains:nsuserdomainmask]; _localroot = [paths objectatindex:0]; homecoming _localroot; }

the above code url path documents directory need art document directory path.

nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *documentsdirectory = [paths objectatindex:0]; nsstring *yourartpath = [documentsdirectory stringbyappendingpathcomponent:@"/art"];

iphone directory nsfilemanager

No comments:

Post a Comment