Expand description
Local file enumeration for the library view.
Walks the user’s currently configured watch paths, applies the same
filtering rules used by the sync engine (FolderRules + supported-media
extensions), and produces a list of LocalAsset rows that the library
grid can display alongside (or instead of) remote Immich assets.
Unlike the sync path, this module does NOT compute checksums on enumeration
— that would be too expensive for browsing. Sync state is matched by
looking up SyncIndex.stored_checksum(path) for paths the engine has
already hashed; assets the user hasn’t synced yet show as “Local only”.
Structs§
- Local
Asset - A single file enumerated from the user’s watched folders.
Functions§
- build_
asset 🔒 - Parse metadata details and construct a typed
LocalAssetfor a file path. - enumerate_
blocking 🔒 - Walk directories on a thread pool thread to search for media files.
- enumerate_
local - Walk every configured watch path and return matching media files.
- enumerate_
local_ for_ entry - Enumerate only the watch entries matching
entry_path. Used by the album-scoped Local/Unified views so a linked album’s view stays bounded to its own folder instead of spilling assets from sibling albums. - filter_
by_ filename - Apply a case-insensitive filename substring filter, matching the spec’s “Local Search: file name based” requirement.
- format_
modified 🔒 - Convert a file modification timestamp into standard ISO-8601 formatting.
- local_
sync_ state - Decide the sync-state badge for a local asset.