Re: NSFileManager and aliases
Re: NSFileManager and aliases
- Subject: Re: NSFileManager and aliases
- From: Ondra Cada <email@hidden>
- Date: Tue, 16 Apr 2002 08:28:55 +0200
On Tuesday, April 16, 2002, at 12:49 , Charles Srstka wrote:
- aliases try to be too smart, with quite disastrous results sometimes:
one very nice situation is when one trashes old application, install a
new one at the place, and tries to run the app using Dock!
This works fine. Aliases store both a path and the file's entry in the
file system.
Right.
When you delete the old app, its file system entry no longer exists, so
it looks up the path, finds the new app, and launches it.
Wrong. It launches the old app from Trash.
In fact, I believe that unless the Dock is not following the rules
properly, an alias usually checks the path *first* and uses the file
system entry as a fallback if the file at the path location doesn't exist,
causing things not to break as easily.
I should have added also
- the alias behaviour is so cryptic that even those who understand and
love them can't predict their real behaviour.
It's not the first time this happened ;)))
Actually, so far as I understand, it's (generally? there can, actually,
due to the Jim Correia's posts, *must*, be special cases to mist it even
more!) exactly the opposite: an alias normally first checks the "file
system entry" (I think the proper name is a "file ref", though I don't
know quite well what it should mean), and only if it can't resolve, it
tries the path. Also it updates the path implicitly using
not-quite-intuitive rules, even if the file is just opened not changed,
which then self-evidently would bring more fuzziness if two otherwise
exactly same aliases lay in two portions of disk, one writable, one
without access rights... oh, spare me of the thing :((((((((((
- aliases (just like hardlinks) can't be folder-relative, and thus
cannot be archived properly (ie. so as when the whole folder is
unarchived elsewhere, the link still references the appropriate newly
unarchived file)
I'd have to check the Carbon docs, but I think you're wrong about this.
See the posts by Jim Correia.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.