FileDocCategorySizeDatePackage
IndexFileNameFilter.javaAPI DocApache Lucene 1.91447Mon Feb 20 09:20:14 GMT 2006org.apache.lucene.index

IndexFileNameFilter

public class IndexFileNameFilter extends Object implements FilenameFilter
Filename filter that accept filenames and extensions only created by Lucene.
author
Daniel Naber / Bernhard Messer
version
$rcs = ' $Id: Exp $ ' ;

Fields Summary
Constructors Summary
Methods Summary
public booleanaccept(java.io.File dir, java.lang.String name)

    for (int i = 0; i < IndexFileNames.INDEX_EXTENSIONS.length; i++) {
      if (name.endsWith("."+IndexFileNames.INDEX_EXTENSIONS[i]))
        return true;
    }
    if (name.equals(IndexFileNames.DELETABLE)) return true;
    else if (name.equals(IndexFileNames.SEGMENTS)) return true;
    else if (name.matches(".+\\.f\\d+")) return true;
    return false;