rattail.filemon.util

File Monitor Utilities

rattail.filemon.util.queue_existing(profile, path)[source]

Adds files found in a watched folder to a processing queue. This is called when the monitor first starts, to handle the case of files which exist prior to startup.

If files are found, they are first sorted by modification timestamp, using a lexical sort on the filename as a tie-breaker, and then added to the queue in that order.

Parameters:
  • profile – Monitor configuration profile for which the folder is to be watched. The profile is expected to already have a queue attached; any existing files will be added to this queue.
  • path – Folder path which is to be checked for files.