• 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: Tracking files the right way
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking files the right way


  • Subject: Re: Tracking files the right way
  • From: Rosyna <email@hidden>
  • Date: Fri, 30 Aug 2002 15:34:11 -0700

Ack, at 8/30/02, Bill Bumgarner said:

The behavior I have experienced-- on OS 9 and prior, not just OS X-- was for the applications to merrily open and edit the document in the trash with zero warning to the user.

Except when the file is double-clicked in the finder and it was in the trash ;)

Ahh... code examples, now we are back on track and moving away from bordering dangerously close to flogging a dead horse (not an accusation-- I clearly have my cat-o-nine tails in hand). :-)

The foundation offers:

- (NSString *)stringByStandardizingPath
- (NSString *)stringByAbbreviatingWithTildeInPath

The second does the obvious -- substitute '~/' with '~user/' if you want user A to be able to pass a path in their home directory to user B. The first performs a number of operations on the path. Notably, it ensures a path does not refer to /private/ if that part of the path can be removed while the path will still point to the same file. Unfortunately, -stringByStandardizingPath will also cause symlinks to be expanded -- not necessarily what you want.

In what *exact* cases have you seen the private directory?

I'll file a request via bugreport.apple.com.

If anything, this discussion should result in a lot of trips there ;)

In general, this is a really good idea for any developer writing an app that involves some kind of a directory full of resources that isn't managed with NSFileWrapper or NSBundle. Store as much information using relative paths as you possibly can and automate the identification of files as much as possible.

Right, and I think you can store two Aliases to do this, one relative (for the files) and one absolute (for the parents). FSSpecs did this actually. Then resolve the new alias, and base all the other aliases on that path.
--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Tracking files the right way
      • From: Bill Bumgarner <email@hidden>
References: 
 >Re: Tracking files the right way (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Tracking files the right way
  • Next by Date: Re: how to get a file's long name?
  • Previous by thread: Re: Tracking files the right way
  • Next by thread: Re: Tracking files the right way
  • Index(es):
    • Date
    • Thread