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

Re: [MacPerl] Re: Mac resource fork question



At 09.40 11/20/97, Bill Ledbetter wrote:
>with some instability.  This version seems to operate very strangely with
>the MacPerl::GetFileInfo() routine - I cannot make this return expected
>results - usually it just returns nothing, but it is unpredictable.  I have

That has been reported by numerous people (including me).  Here is an
alternative, coupled with the MacPerl:: version:

#!perl -wl
use Mac::Files;
$file = 'PowerPudgeII:Desktop Folder:phone';
$fileInfo = FSpGetFInfo($file);
$crea = $fileInfo->fdCreator();
$type = $fileInfo->fdType();
print join("\n",
  ('1 ' . join("\t", $crea,$type)),
  ('2 ' . join("\t", MacPerl::GetFileInfo($file))),
);


You will notice that running it repeatedly for me returned:

1 R*ch  TEXT
2
1 R*ch  TEXT
2
1 R*ch  TEXT
2
1 R*ch  TEXT
2 R*ch  TEXT
1 R*ch  TEXT
2
1 R*ch  TEXT
2 R*ch  TEXT
1 R*ch  TEXT
2

It seems the Mac::Files method is working consistently.

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    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