At 20:48 -0600 2002.02.17, Timothy Bailey wrote:
>Is there a way to get the creation date of a file?
>
>There is of course the "-M" command from standard Perl to get the
>time since the last modification (which can be used to find the
>modification time, but apparently standard UNIX doesn't track the
>file creation time, and therefore Perl doesn't have a way to get it.
>And I don't see anything in Mac::Files or Mac::MoreFiles to get the
>date.

        #!perl -wl
        use Mac::Files;
        my $info = FSpGetCatInfo('Bourque:Desktop Folder:mp:cpan sites');
        print scalar localtime $info->ioFlCrDat;
        print scalar localtime $info->ioFlMdDat;

Returns:

        Mon Jan  7 21:11:43 2002
        Mon Jan  7 21:16:30 2002

Some of the fields are missing from the Mac::Files docs, I'll take a quick
look at it soon.  Inside Macintosh has all the details though, and Google
is good for searching IM (searched for "site:apple.com file creation time"
and clicked "Basic File Manager Parameter Block (IM: F)").

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to