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

Re: [MacPerl] not following aliases



At 12.10 -0500 1999.03.10, Dave Lorand wrote:
>That's half of it.  My other question is, which of the toolbox calls I'm
>making will cause the alias to be followed?  I'd like to get as much info
>as I can on aliases without actually following them.

I think all of them will get info on the aliased-to file, not the alias itself.

You can get some of the data you want with the lstat command.  That will
give you the size of the alias, anyway.  Here is a way using File::stat:

    $size = -l $_ ? lstat($_)->size : stat($_)->size;

I noticed that CatInfo will return data for an alias file instead of its
target if the alias file is opened in ResEdit.  I don't know of a way to
exploit that here, though.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

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