Re: Changing a filename while the FSRef is in use
Re: Changing a filename while the FSRef is in use
- Subject: Re: Changing a filename while the FSRef is in use
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 8 Feb 2004 12:58:25 +0100
At 19:05 Uhr +0800 08.02.2004, ruffnex wrote:
Given a download path and filename, I create a FSRef and pass to a
3rd party routine which writes data to the file. In Finder, I can
move this growing file, rename it, and the data continues to be
written correctly.
Is this use of an Alias? Or something that is supported by Carbon
FileManager?
I think as long as you have the file open for reading/writing, it
will always point to the same file, even when it is moved or renamed.
aka "it just works".
Alias records are useful in the case where the file is closed and
you want to keep a less fragile reference to it around even when the
file is closed, your app is no longer running, or the computer will
be restarted before you refer to the file again. I.e. if you save
references to files in your NSUserDefaults, it'd be a good idea to do
so as an alias (e.g. using the great BDAlias class).
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.