You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Mag Gam <ma...@gmail.com> on 2006/08/25 13:44:03 UTC

Index Stat Functions

Hi All,

I am trying to get some stats on my Index such as:

1) When it was created
2) Size in MB of the index
3) If I can get the size, date of each file in the index. For example: I
index 100 files, is it possible for me to get their name, size, and date
when the last modification of that file (similar to a unix "ls -la
/path/to/file)

tia

Re: Index Stat Functions

Posted by Hasan Diwan <ha...@gmail.com>.
On 25/08/06, Mag Gam <ma...@gmail.com> wrote:
> 1) When it was created
> 2) Size in MB of the index
> 3) If I can get the size, date of each file in the index. For example: I
> index 100 files, is it possible for me to get their name, size, and date
> when the last modification of that file (similar to a unix "ls -la
> /path/to/file)

You can get all this using the stat() system call. There's a sample of
designing a JNI wrapper at
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html.
-- 
Cheers,
Hasan Diwan <ha...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org