Expand description
Provides live filesystem monitoring, file-settling checks, and checksum generation.
Uses notify watchers (inotify on Linux, polling under Flatpak) to
detect new or modified files in watch-path directories. Files are
settled via a debounce window before being queued, and checksums are
computed using BLAKE3 with chunked streaming to avoid large allocations.
StructsΒ§
- Monitor
- File monitor that coordinates watching directories and reporting events.
- Monitor
Handle
EnumsΒ§
- Monitor
Command π - Monitor commands passed down the main event loop.
- Monitor
Event - Monitor
FsEvent π
ConstantsΒ§
- CHECK_
INTERVAL_ πMS - FLATPAK_
POLL_ πINTERVAL_ MS - IDLE_
TIMEOUT_ πSECS - REQUIRED_
STABLE_ πCOUNTS - Number of consecutive stable size checks required before a file is considered complete.
FunctionsΒ§
- compute_
sha1_ πchunked - Compute SHA-1 in chunks so large media files never need to be read fully into memory.
- create_
watcher π - Create recommended watcher fallback or poll watcher depending on flatpak containerisation.
- handle_
notify_ πevent - hash_
and_ πemit - is_
flatpak_ πsandbox - Check if running inside Flatpak sandbox environment.
- is_
supported_ πmedia_ path - Return whether a path points to a supported media file rather than a directory.
- is_
temporary_ πfile - monitor_
event_ πkind - process_
delete_ πpath - process_
upsert_ πpath - replace_
watches π - Replace live directories being monitored by the given watcher.
- should_
skip_ πpath - spawn_
hash_ πworkers - wait_
for_ πfile_ completion - Wait for a fileβs size to stop changing before treating it as upload-ready.