Asper Header  1.0.14
The header injector extension
Loading...
Searching...
No Matches
LazyFileLoader Class Reference

Generic lazy file loader with caching and type safety @template T The expected type of the loaded file content. More...

Collaboration diagram for LazyFileLoader:
Collaboration graph

Detailed Description

Generic lazy file loader with caching and type safety @template T The expected type of the loaded file content.

A utility class that provides lazy loading of files with automatic caching, JSON parsing, and flexible path resolution. Supports both relative and absolute file paths with configurable working directory.

Features:

  • Generic type support for type-safe file content
  • Automatic JSON parsing for .json and .jsonc files
  • In-memory caching to avoid repeated file system access
  • Configurable working directory for relative path resolution
  • Path existence validation and error handling
  • Cache invalidation and manual reload capabilities

The documentation for this class was generated from the following file: