Skip to main content.
home | support | download

Back to List Archive

Limiting filesize on searching.

From: Gertjan Hofman <gertjan_hofman(at)not-real.yahoo.com>
Date: Fri Jul 07 2006 - 16:24:50 GMT
I am just posting this for dummies like me who aren't
familiar and/or dislike perl. When I asked Peter
Karman on how to do restrict the size of file being
anlyzed by swish-e  he responded:



Gertjan Hofman scribbled on 7/6/06 1:37 PM:
> is there no way
> to limiting the max size of the file which is
analyzed
> when not using -S prog ? It seems such a simple &
> useful feature, yet  I can't find it. 


Response:

I realize I didn't respond directly to this question.
No, swish-e  itself  has no such feature. You'd want
to implement in DirTree.pl with  something like:

  sub check_path {
     my $path = shift;
     return 0 if -s $path > 10000; # max bytes
     return 1;  # return true to process this file
  }

-- 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Received on Fri Jul 7 09:24:54 2006