title: ios save audio and video url into document directory
body: <p>I need to save all of audio and video url's into document directory which comes from the server. i have tried a sample code</p>
  
  <pre><code>NSData *urlData = [NSData dataWithContentsOfURL:[NSURL URLWithString: "http://www.ebookfrenzy.com/ios_book/movie/movie.mp4"]];
  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString  *documentsDirectory = [paths objectAtIndex:0];
  NSString *dataPath_ = [documentsDirectory stringByAppendingPathComponent:@"/MyFolder"];
  NSString *newStr = [@"test" stringByAppendingString:[NSString stringWithFormat:@".mp4"]];
  NSString *FilePath = [NSString stringWithFormat:@"%@/%@",dataPath_,newStr];
  [urlData writeToFile:FilePath atomically:YES];
  </code></pre>
  
  <p>The folder is creating in document directory but the video is not saving into the folder.Can anyone help to sort this out.</p>