Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Get file From one Document Folder to Another Document Folder?
    primarykey
    data
    text
    <p>In my Application i save Recording file in Document Directory.then later gets all these file from document directory and showing all these files in My mainClass where i have UITableview for it. When i Click on any row of this mainClass Tableview it goes to next Class where i play this file,delete this file and Send this file to my Favourite Recording Class where i have Tableview for it.Now my play button action method and delete Button action method works fine but i Don't know how to send this file to my Favurite Class Tableview.now i show here my delete button Code through which we can get the basic idea.</p> <pre><code> -(IBAction)deleteFile { NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsDir = [dirPaths objectAtIndex:0]; NSString *documentPath = [docsDir stringByAppendingPathComponent:@"MyRecordings"]; NSString *soundFilePath = [documentPath stringByAppendingPathComponent:fileToPlay]; recordedTmpFile = [NSURL fileURLWithPath:soundFilePath]; [[NSFileManager defaultManager] removeItemAtURL:recordedTmpFile error:nil]; } </code></pre> <p>As my Delete button Code show how we delete the Current Recording file which i selected from MainTableview .Now if the user Want to send the current Recording file to my Favourite Class Tableview instead of Deleting it then Whether i use the another Document folder here if answer is yes? then how we can save the Current file(recordedTmpFile) in this new Document folder.</p> <pre><code> -(IBAction)AddToFavourite { NSArray *dirPaths1 = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsDir1 = [dirPaths1 objectAtIndex:0]; NSString *documentPath1 = [docsDir1 stringByAppendingPathComponent:@"MyFovouriteRecordings"]; // How to pass here the Current Recording File (recordedTmpFile) to this new document Folder. } </code></pre> <p>When i NSlog recordedTmpFile it show result :file://localhost/Users/Umar/Library/Application%20Support/iPhone%20Simulator/4.2/Applications/9219677A-B0E3-4B78-B2E5-FEA49D689618/Documents/MyRecordings/06:Dec:12_05:54:07%20PM+Active%20song</p> <p>Any Help will be appriated.Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload