How can I get url path for a particular directory inside Document Directory.
like Document/Art/
My code
- (NSURL *)localRoot {
if (_localRoot != nil) {
return _localRoot;
}
NSArray * paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];
_localRoot = [paths objectAtIndex:0];
return _localRoot;
}
The above code is url path for Documents
directory but I need Art
document directory path.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *yourArtPath = [documentsDirectory stringByAppendingPathComponent:@"/Art"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With