Skip to content

caseyjkey/Filesystem-Crawler-Modern-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filesystem Crawler - Modern C++

A high-performance, memory-efficient file crawler for GNU/Linux systems showcasing advanced C++ design patterns and modern C++ practices.

Overview

This project implements a fast filesystem traversal engine using RAII, smart pointers, and custom STL-compatible iterators. Built with modern C++ standards, it demonstrates clean object-oriented architecture with template metaprogramming.

Key Features

  • Factory Pattern: Dynamic object creation via makeFing()
  • Custom Iterators: STL-compatible iterator implementation for traversal
  • Operator Overloading: Full suite of arithmetic, comparison, and boolean operators
  • Template Metaprogramming: Dual<T, U> template design for flexible type handling
  • POSIX Integration: Direct system calls for efficient filesystem operations
  • Smart Pointers: Memory-safe resource management using shared_ptr

Architecture

The codebase employs multiple design patterns:

  • Factory pattern for object instantiation
  • Iterator pattern for sequential access
  • Functor pattern with custom comparators
  • RAII for automatic resource management

Building

make
./test

Technical Deep Dive

Memory Management

Uses RAII principles with std::shared_ptr to ensure automatic cleanup of resources, preventing memory leaks without manual destructor logic.

Iterator Design

Custom iterators provide STL-compatible traversal, enabling use with standard algorithms and range-based for loops.

POSIX API Integration

Direct system calls provide low-level filesystem access with maximum performance on GNU/Linux systems.

TODO

  • Migrate to C++17/20 features
  • Add comprehensive test suite
  • Implement parallel directory traversal
  • Add Windows platform support
  • Create benchmarking suite
  • Add symbolic link handling options