Reputation: 1064
NSURL *currentURL = [[NSURL alloc]
initWithString: [fileManager currentDirectoryPath]];
This call returns nil. How should I change it so that it returns a pointer to the NSURL for the current working directory?
Upvotes: 1
Views: 1566
Reputation: 22405
Here is one way
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
int ind=0;
NSString* destinationFilePath = [NSString stringWithFormat: @"%@/input%d.mp3", documentsDirectory,ind];
Upvotes: 0
Reputation: 29985
NSDocumentDirectory
NSCachesDirectory
[NSBundle pathForResource:ofType:]
(docs)Upvotes: 0