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

Re: [MacPerl] more info from FSpGetFInfo



At 08.46 1998.02.25, Axel Rose, SPRINGER & JACOBY wrote:
>I would like to get more information out of FSpGetFInfo,
>in particular file size, creation date, modification date.
...
>I was fascinated by the speed of the Mac::Files functions.
>So I wanted to get the stat() infos (mtime, ctime) from
>Mac Toolbox calls.

Just use stat().  Should be plenty fast.  Remember to use the special
argument to _ to cut down on the calls to stat(), though, i.e.:

  print -d $file ? 'directory' : -f _ ? 'file' : '????';

File test operators call stat(), and a test on _ means "use the result of
the previous call to stat".

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch