dctools.utilities.file_utils.FileCacheManager
- class dctools.utilities.file_utils.FileCacheManager(max_files)
Manages a cache of files with automatic cleanup when limit is reached.
- Parameters:
max_files (int)
- __init__(max_files)
- Parameters:
max_files (int)
Methods
__init__(max_files)add(filepath)Add a file to the cache, removing oldest if cache is full.
clear()Clear all files from the cache.
remove(filepath)Remove a file from the filesystem.
- add(filepath)
Add a file to the cache, removing oldest if cache is full.
- Parameters:
filepath (str)
- clear()
Clear all files from the cache.
- remove(filepath)
Remove a file from the filesystem.
- Parameters:
filepath (str)