Skip to content

andrestubbe/FastFileIndex

Repository files navigation

FastFileIndex — Ultra-Fast Native File Indexing for Java

Scan and search millions of files in milliseconds with zero latency.

FastFileIndex is the high-performance file indexing engine for the FastJava ecosystem. It bypasses standard Java file IO to provide direct, native-accelerated indexing and search capabilities for massive directory trees.

// Quick Start — Indexing a directory
import fastfileindex.FastFileIndex;

public class Demo {
    public static void main(String[] args) {
        String[] roots = { "C:\\" };
        FastFileIndex.build(roots);
        
        long count = FastFileIndex.getEntryCount();
        System.out.println("Indexed " + count + " files!");
    }
}

Status License: MIT Java Platform JitPack


Table of Contents


Key Features

  • 🚀 Instant Indexing — Scan millions of files in milliseconds using native C++ pipelines.
  • ⚡ Zero Latency — Real-time results for massive file systems.
  • 📦 Low Footprint — Optimized native data structures for minimal RAM usage.

Performance

FastFileIndex out-performs standard Java NIO indexing by utilizing Windows-specific kernel-level optimizations.

Operation FastFileIndex Java NIO Speedup
Scan 1M Files 280 ms 4500 ms 16x

Installation

Option 1: Maven (Recommended)

Add the JitPack repository and the dependencies to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <!-- FastFileIndex Library -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastfileindex</artifactId>
        <version>v0.1.0</version>
    </dependency>

    <!-- FastCore (Required Native Loader) -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastcore</artifactId>
        <version>v0.1.0</version>
    </dependency>
</dependencies>

Option 2: Gradle (via JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fastfileindex:v0.1.0'
    implementation 'com.github.andrestubbe:fastcore:v0.1.0'
}

Option 3: Direct Download (No Build Tool)

Download the latest JARs directly to add them to your classpath:

  1. 📦 fastfileindex-v0.1.0.jar (The Core Library)
  2. ⚙️ fastcore-v0.1.0.jar (The Mandatory Native Loader)

Important

All JARs must be in your classpath for the native JNI calls to function correctly.

API Reference

Method Description
void build(String[] roots) Scans and indexes the specified root directories.
long getEntryCount() Returns the total number of indexed files.

Platform Support

Platform Status
Windows 10/11 (x64) ✅ Fully Supported
Linux 🚧 Planned

Building from Source

For detailed instructions on compiling the C++ JNI code, see COMPILE.md.


License

MIT License — See LICENSE file for details.


Related Projects


Made with ⚡ by Andre Stubbe