[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-user
Subject: Re: indexing whole harddrive
From: Azlan Abdul Latiff <azlan95 () myjaring ! net>
Date: 2006-01-31 23:45:25
Message-ID: 1138751125.43dff69525b83 () webmail ! jaring ! my
[Download RAW message or body]
hi Rajesh,
thanks for the reply. i'll go ahead with the new method as you suggest.
----- Original Message -----
From: "Rajesh Munavalli" <findmath@gmail.com>
To: <java-user@lucene.apache.org>
Sent: Tuesday, January 31, 2006 10:06 PM
Subject: Re: indexing whole harddrive
You have to recursively traverse the directories using something
like...(in
Java)
void indexDocs(String file){
if (file.isDirectory()) { // if a directory
String[] files = file.list(); // list its files
for (int i = 0; i < files.length; i++) // recursively index them
indexDocs(new File(file, files[i]));
}
...
}
--
Rajesh Munavalli
On 1/31/06, Azlan Abdul Latiff <azlan95@myjaring.net> wrote:
>
> how can I index the whole hard drive? I tried using "c:/" but it didnt
> work.
>
> The results only return c:/ directory where as a I want it to index all
> the sub folders as well as the the other directories.
>
> Azlan
>
>
> ----------------------------------------------------------------
> This e-mail has been sent via JARING webmail at http://www.jaring.my
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
----------------------------------------------------------------
This e-mail has been sent via JARING webmail at http://www.jaring.my
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic