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!");
}
}- Key Features
- Performance
- Installation
- Try the Demo
- API Reference
- Platform Support
- Building from Source
- License
- Related Projects
- 🚀 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.
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 |
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>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:fastfileindex:v0.1.0'
implementation 'com.github.andrestubbe:fastcore:v0.1.0'
}Download the latest JARs directly to add them to your classpath:
- 📦 fastfileindex-v0.1.0.jar (The Core Library)
- ⚙️ 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.
| Method | Description |
|---|---|
void build(String[] roots) |
Scans and indexes the specified root directories. |
long getEntryCount() |
Returns the total number of indexed files. |
| Platform | Status |
|---|---|
| Windows 10/11 (x64) | ✅ Fully Supported |
| Linux | 🚧 Planned |
For detailed instructions on compiling the C++ JNI code, see COMPILE.md.
MIT License — See LICENSE file for details.
- FastCore — Native Library Loader for Java
- FastFileSearch — Real-time fuzzy search engine
- FastThumb — Native Shell Image Engine
Made with ⚡ by Andre Stubbe