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

Re: [MacPerl] setting file attributes



ero brown <ero@fiber.net> writes:
>I'm trying to find a way to change various file attributes
>with MacPerl.

The good news is that this feature is available through FSpGetCatInfo in
Mac::File.

The bad news is that anything you write to that interface now is going to
need slight changes with 5.1.4.

The current interface for making a file invisible is something like:

use Mac::File;

$info = FSpGetCatInfo("file");
$finfo= $info->{ioFlFndrInfo};
$finfo->{fdFlags} = $finfo->{fdFlags} | 16384;
$info->{ioFlFndrInfo} = $finfo;
FSpSetCatInfo("file", $info);

The new interface will be something like:

$info = FSpGetCatInfo("file");
$finfo= $info->ioFlFndrInfo;
$finfo->fdFlags($finfo->fdFlags | fInvisible);
$info->ioFlFndrInfo($info);
FSpSetCatInfo("file", $info);

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "... after a few more flashes in the pan, we shall hear very little more
  of Edison or his electric lamp. Every claim he makes has been tested and
  proved impracticable." -- _New York Times_, January 16, 1880



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