Re: Getting the size of a folder with Mac::Glue

2004-03-22 Thread Chris Nandor
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Rick Measham) wrote: > On 18 Mar 2004, at 6:06 AM, Chris Nandor wrote: > > This works: > > > > my $obj = $finder->obj(folder => '/Users/pudge/Movies'); > > my $size = $finder->data_size($obj); > > > > Chris, what is the data_size? B

Re: Getting the size of a folder with Mac::Glue

2004-03-18 Thread Rick Measham
On 18 Mar 2004, at 6:06 AM, Chris Nandor wrote: This works: my $obj = $finder->obj(folder => '/Users/pudge/Movies'); my $size = $finder->data_size($obj); Chris, what is the data_size? The correct size of the folder is (from Finder info) 8.6MB on disk (4,001,454 bytes) rickm% perl -e

Re: Getting the size of a folder with Mac::Glue

2004-03-17 Thread Jeff Lowrey
At 12:34 AM 3/17/2004, Conrad Schilbe wrote: What ever happened to portability of code. I was just trying to answer the question as asked As someone else pointed out: $size = `du -sk $dir`; Would do the trick nicely. Without checking it myself, I'll suggest that du might return a value that

Re: Getting the size of a folder with Mac::Glue

2004-03-17 Thread Chris Nandor
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Rick Measham) wrote: > I'm trying to get the size of a folder and figure Mac::Glue would be > the way to go. However I'm getting back a 0: > > use Mac::Glue; > my $finder = new Mac::Glue 'Finder'; > die("No such file: $monthdir/$folder/") unles

Re: Getting the size of a folder with Mac::Glue

2004-03-16 Thread Conrad Schilbe
What ever happened to portability of code. Not to slag Mac::Glue but even the name suggests that your going to spend decades re-writing code should you need to move to a different platform. I can see it's purpose from some of the other threads here when working with iTunes or something but in this

Re: Getting the size of a folder with Mac::Glue

2004-03-16 Thread Jeff Lowrey
At 01:48 AM 3/16/2004, Rick Measham wrote: I'm trying to get the size of a folder and figure Mac::Glue would be the way to go. However I'm getting back a 0: my $size = $finder->data_size("$monthdir/$folder/"); print $size; From my own mistakes with Mac::Glue, I'm guessing you need to add a ->get

Re: Getting the size of a folder with Mac::Glue

2004-03-16 Thread Ken Williams
On Tuesday, March 16, 2004, at 12:48 AM, Rick Measham wrote: I'm trying to get the size of a folder and figure Mac::Glue would be the way to go. However I'm getting back a 0: [...] (If there's a better way to get the size of a folder, please let me know!) You can use `du -sk $folder` to get th

Getting the size of a folder with Mac::Glue

2004-03-15 Thread Rick Measham
I'm trying to get the size of a folder and figure Mac::Glue would be the way to go. However I'm getting back a 0: use Mac::Glue; my $finder = new Mac::Glue 'Finder'; die("No such file: $monthdir/$folder/") unless -e "$monthdir/$folder/"; my $size = $finder->data_size("$monthdir/$folder/"); print