• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fwd: About CFURLGetFSRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: About CFURLGetFSRef


  • Subject: Fwd: About CFURLGetFSRef
  • From: "Nick Kreeger" <email@hidden>
  • Date: Wed, 31 May 2006 11:14:36 -0500

---------- Forwarded message ----------
From: Nick Kreeger <email@hidden>
Date: May 31, 2006 11:11 AM
Subject: Re: About CFURLGetFSRef
To: dinu john <email@hidden>

John,

|CFURLGetFSRef| is a carbon function that gets a reference to the URL of the
passed in string. In your instance:

FSRef parentDir;
CFURLGetFSRef((CFURLRef)[NSURL fileURLWithPath: [[self
tempFileRecordingPath] stringByDeletingLastPathComponent]], &parentDir);

You are getting a reference to the |tempFileRecordingPath| directory, but
you delete the last path component (so it will be the parent folder).

If you want to create a tempory file, i would recommend using the cocoa
interface NSFileManager
(http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/index.html
). There are API's to interact with files there.

Nick
On 5/31/06, dinu john <email@hidden> wrote:

Hi,

I am new to cocoa  please tell what these lines means


Where will the file created and where is the temp directory


FSRef parentDir; CFURLGetFSRef((CFURLRef)[NSURL fileURLWithPath: [[self tempFileRecordingPath] stringByDeletingLastPathComponent]], &parentDir);


and which is the parent directory

These lines are crashing during the run time but compiling properly

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      ( email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >About CFURLGetFSRef (From: dinu john <email@hidden>)

  • Prev by Date: Re: Client ssh
  • Next by Date: NSPasteboard discard type
  • Previous by thread: About CFURLGetFSRef
  • Next by thread: Re: About CFURLGetFSRef
  • Index(es):
    • Date
    • Thread