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

Re: [MacPerl] -s File Test Operator



In article <mac-perl.35b69f57.3212343@mailhost.tornado.be>,
bart.mediamind@tornado.be (Bart Lateur) wrote:

>On Tue, 21 Jul 1998, Jeff at MacTech wrote:
>
>>On the other hand, if -s is supposed to return the size of a file, it
>>doesn't do that.

This is a little after-the-fact, but I wonder if the parser would choke on
a two-letter command, for instance -ss for total file size?

Just a quick comment or two:

>The only reason I can think of, for -s to return the combined sizes of
>both forks, is to let you estimate how much room you need to copy a
>file.
...
>In short: I can see no reason whatsoever for the Mac to simply add the
>number of bytes of both forks. The result would be useless.

I can think of other reasons. So can Apple, apparently, since Get Info
returns the total file size, and you have to dig for a while to find a
third-party utility (or you have to write a program) which tells you the
sizes of the forks separately.

It all depends on what you are using it for. I've personally never, that I
can remember, used -s to give me info I'll need for reading in and
processing a file--if I need to process it, I just do it, usually a
line-at-a-time, so memory isn't an issue. In my case, I was using it as a
quick test to pick the odd men out of a large set of files, most of which
were identical. For my purposes the data fork size did suffice, but in
other situations there may be no data forks, hence my concern.
-- 
__________________________________________________________________________

Jeff Clites                Online Editor           http://www.MacTech.com/
online@MacTech.com         MacTech Magazine
__________________________________________________________________________

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