[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] why shouldn't I store FSSpecs "between runs



On 2:34 PM 12/28/99 "Martin D." <martind@algonet.se> wrote:

> Later when I was looking at MakeFSSpec in the reference part of the
> book they tell me not to store filespecs between runs of MacPerl. For
> some reason it's not a good idea, it still seems to be just that to me
> though;), to avoid hardcoded paths by writing filespecs to file... I'm
> curious to know why it's a bad thing to do?

FSSpecs depend on the vRefNum and parID.

If you move the file, the fsspec will be invalid.

If you mount your local volumes in a different order, the vRefNum will
be different.

If you need to store persistent file references, use aliases.

-- 
Jim Correia                                Bare Bones Software, Inc.
correia@barebones.com                     <http://web.barebones.com>

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org