Function list_directories_to_cleanup

Source
pub(crate) fn list_directories_to_cleanup(prev: String) -> Vec<String>
Expand description

File management: return a vector of directories eligible to delete as a “cleanup” operation

Eligibility criterion: any directory that isn’t the most recent for its revision.

Example: If the contents of “previous” is the following list of directories:

  1. Rev_-_UTC-2025-01-01-T00-00-00
  2. Rev_-_UTC-2025-01-01-T00-00-01
  3. Rev_A_UTC-2025-01-01-T00-05-00

The only eligible directory for deletion would be #1, because #2 is the latest Rev -, and #3 is the latest (only) Rev A.