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 7787913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:49:24+00:00 2026-06-01T20:49:24+00:00

I am trying to create a file by fopen and then write it, but

  • 0

I am trying to create a file by fopen and then write it, but weird things happened.

  1. When I plug in the iphone to the usb port. Everything works fine. A file is created at the tmp directory or the document directory as expected.
  2. When I plug off the device and do the same thing, the file did not appear. I was wondering why.

I use fopen to create the file. In my case, I should do this to create and then write the file. The call is fopen(pcm_output, “wb+”);

  • 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-01T20:49:26+00:00Added an answer on June 1, 2026 at 8:49 pm

    You need to use this call.

        char const *path = [fileManager fileSystemRepresentationWithPath:url.path];
    

    From the docs…

    fileSystemRepresentationWithPath:
    – (const char *)fileSystemRepresentationWithPath:(NSString *)path

    iOS (2.0 and later)

    Returns a C-string representation of a given path that properly encodes Unicode strings for use by the file system.

    path: A string object containing a path to a file.
    A C-string representation of path that properly encodes Unicode strings for use by the file system.

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

Sidebar

Related Questions

I am trying to create an XML file, but the XML file needs to
I'm trying to create a php page with fopen() this php file will house
I am trying to create a text file with PHP in fopen(test.txt,a) . I
I'm trying to create 5000 junk files, write them to a file and delete
I am trying to create a folder and fopen a file inside that folder.
I am trying to write a PGM file in a C program, but once
Here's an idea. I'm trying to create file from PHP script. File may be
I am trying to create a file using File newFile = new File(myFile); However
I am just trying to create a file with QProcess by the following source
I'm trying to create a folder and create a file within it. Whenever i

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.