• 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
Re: FSRef-like primitive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSRef-like primitive?


  • Subject: Re: FSRef-like primitive?
  • From: Brendan Younger <email@hidden>
  • Date: Sun, 19 Aug 2001 14:28:30 -0500

Aesthetic gripes and complaints aside. I strongly suggest you make a wrapper class for the alias manager in carbon. It does precisely what you're looking for.

On Saturday, August 18, 2001, at 02:03 AM, Paul Bayley wrote:

Hello,
I hope this isn't a dead topic before I start it. I was wondering if Cocoa is ever going to have a primitive homogeneous to Carbon's FSRef. The problem is a lot of methods in Cocoa take a POSIX path in the form of an NSString as an argument and I see this as leading to trouble down the road if the path of a file is changed by another application. Personally I don't understand why file paths are used in this manner since they don't necessarily point to the same file at time A and B. However I don't see any way to remove the assumption that a file's path is constant since I can't generate the file path from some kind of file system reference when I need it (thus using the existing API without assuming the file path is constant).

My request is probably easier to ask for than to implement. Basically I want a lightweight object analogous to NSFSRef (CFFSRef too perhaps) which could either be used as an NSString or converted to a CFURL thus allowing me to use this otherwise nice API without assuming that file paths are constant. Somebody told me Apple is changing NSDocument to do something to this effect, but that's a huge class full of stuff I don't even want to deal with for a simple file operation.

This class could also post a notification if the file was modified by another process.

A better solution perhaps would be to add methods analogous to those wanting file paths to want FSRefs to avoid having to lookup the file path every time, but perhaps that's an unreasonable request.

I would like to use Cocoa very much, however mixing Carbon file i/o calls and Cocoa for everything else kind of defeats the point of a homogeneous application framework.

Thank you for your help

Brendan Younger


References: 
 >FSRef-like primitive? (From: Paul Bayley <email@hidden>)

  • Prev by Date: Re: in-memory files?
  • Next by Date: Re: in-memory files?
  • Previous by thread: FSRef-like primitive?
  • Next by thread: Re: FSRef-like primitive?
  • Index(es):
    • Date
    • Thread