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

[MacPerl] more info from FSpGetFInfo



Hello Anybody!

I would like to get more information out of FSpGetFInfo,
in particular file size, creation date, modification date.

I am doing something like this:
while ( $files[$i] )
{
	$finfo = FSpGetFInfo( $files[$i] );
	$type = $finfo->fdType();
	print "$files[$i]\n$finfo\ttype = $type\n";
	$i++;
}

which produces output like this:
System:eigene Scripte:DBD-test.pl
FInfo=SCALAR(0x1899ae0)	type = ????

Background:
I made a Perl script printing out the contents of
folders and subfolders sorted by modification time.
This is something I can't do with the Finder.
(BTW: there are no standard commands in Unix to do
this too. I added a simple C program "stat" to run
"find . | stat | sort -n | cut -c11-".)

Now I can do the task with "stat()" calls, recursing
and distinguishing between links (Aliases) and directories.

I was fascinated by the speed of the Mac::Files functions.
So I wanted to get the stat() infos (mtime, ctime) from
Mac Toolbox calls.


Any hints very much appreciated


Axel

---
<-:   Axel Rose, SPRINGER & JACOBY Digtal GmbH & Co. KG    :->
<-:                    mailto:rose@sj.com                  :->
PGP key 1024/A21CB825 E0E4 BC69 E001 96E9  2EFD 86CA 9CA1 AAC5
<-:   "Alles was entsteht ist Wert, da§ es zugrunde geht"  :->



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