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

Re: [MacPerl] Setting a file's label



At 19.33 1998.04.22, Craig Muth wrote:
>    Is there a way to access and set a file's label through MacPerl?  By
>"label," I mean that which you can set through the Label submenu form
>the Finder's File menu.

Check bits 1-3 of fdFlags() in FInfo.

  #!perl -w
  use Mac::Files;
  $file = $ARGV[0];
  $FInfo = FSpGetFInfo($file);
  $flags = $FInfo->fdFlags();

You can assign a value back to fdFlags and then to the file like:

  $FInfo->fdFlags($newvalue);
  FSPSetFInfo($FInfo, $file);

--
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