How can I get url path for a particular directory inside Document Directory.
like Document/Art/
My code
- (NSURL *)localRoot {
Based on above answer here is an simple methode that returns, path for given directory:
+ (NSString *) pathFor : (NSString *) directoryName{
return [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:directoryName];
}
You need to implement it in ClassName.m
and call as:
NSString *pathForDirectory = [ClassName pathFor:dirName]; //@"Art" in your case