Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8996455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:45:25+00:00 2026-06-15T23:45:25+00:00

In my Application i save Recording file in Document Directory.then later gets all these

  • 0

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.

  -(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];

}

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.

 -(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.
}

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

Any Help will be appriated.Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:45:26+00:00Added an answer on June 15, 2026 at 11:45 pm
    -(IBAction)AddToFavourite {
        NSArray *dirPaths1 = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,   NSUserDomainMask, YES);
        NSString *docsDir1 = [dirPaths1 objectAtIndex:0];
        NSString *documentPath1 = [docsDir1 stringByAppendingPathComponent:@"MyFovouriteRecordings"];
        NSString *soundFilePath1 = [documentPath1 stringByAppendingPathComponent:fileToPlay];
        // How to pass here the Current Recording File (recordedTmpFile) to this new document Folder.
    
        // First check if the directory existst
        if([[NSFileManager defaultManager] fileExistsAtPath:documentPath1]==NO) {
            NSLog(@"Creating content directory: %@",documentPath1);
            NSError *error=nil;
            if([[NSFileManager defaultManager] createDirectoryAtPath:documentPath1 withIntermediateDirectories:NO attributes:nil error:&error]==NO) {
                NSLog(@"There was an error in creating the directory: %@",error);   
            }
        }
    
        //then get the origin file path
        NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *docsDir = [dirPaths objectAtIndex:0];
        NSString *documentPath = [docsDir stringByAppendingPathComponent:@"MyRecordings"];
        NSString *soundFilePath = [documentPath stringByAppendingPathComponent:fileToPlay];
    
        //Then convert paths to URL
        NSURL* originURL = [NSURL fileURLWithPath:soundFilePath];
        NSURL* destinationURL = [NSURL fileURLWithPath:soundFilePath1];
    
        //Then, you have to copy the file
        [[NSFileManager defaultManager] copyItemAtURL:destinationURL toURL:originURL error:NULL];
    }
    

    That should do it, tell me if there is any error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create my Application directory to save my configuration file. but blackberry
My application allows users to save data to a sqlite file. To ensure a
My problem is save the audio file (.wav) that my flash application generate when
I am Working on Recording Application.in This Application i Save my Recording with my
I want to record a video from my Android application. like this File f
I have an application which must save client instances of com.smartgwt.client.widgets.Canvas to a disk
I have an application without a save button; saving happens automatically in the background.
I save pictures to my application on sd card. When I go to gallery
My application uses MS access database to save some sensitive information. Though that information
Some application we're using depends on TComponent descendants to easily save/load the state of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.