in reply to Re: Re: Limit a filesize
in thread Limit a filesize

You did misunderstand, or I was unclear. First and foremost the size of a file is not the same as the size of it's contents (especially on some filesystems). But for all but the strictest of purposes it's close enough. What I suggested was something like:
#About to append $message, do we have enough room? if( -s $file + length($message) > $maxSize ){ #do magic here }

--
perl -pe "s/\b;([mnst])/'\1/mg"

Replies are listed 'Best First'.
Re: Re: Re: Re: Limit a filesize
by Flame (Deacon) on Apr 09, 2002 at 03:16 UTC
    Oh, I think I understand now, basically, it's just a good approximation, not precise. Ok, thanks. I'll see what I can do with the information you guys gave me (including those of you in other sub-threads.)

    Thanks



    "Weird things happen, get used to it."

    Flame ~ Lead Programmer: GMS