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

Re: [MacPerl] How to change a file's type & creator?



At 17:22 +0200 21-02-2000, Shai Spharim wrote:
>I have utility that reads one file, sorts and massages and writes 
>every thing to a new file.
>I would like the new file to have the same type and creator as the old one.
>
>Can this be done with MacPerl?

Yep, dead easy:

---------
require 'StandardFile.pl';

$fulloutpath = &StandardFile::GetFile('TEXT','ttxt','ttro' , "Default file");
print $fulloutpath;

MacPerl::SetFileInfo("R*ch","TEXT", $fulloutpath);

# Where R*ch is the Creator of my favorite text editor.
----------


Axel

_____________________________
Axel M. Roest                | AXEL Development & Support
info@axel.nu                 | Macintosh developer & UNIX sysadmin
http://www.axel.nu           | 42

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