Skip to main content

rotate_files

Function rotate_files 

Source
pub fn rotate_files(
    dir: &Path,
    config: &RetentionConfig,
    dry_run: bool,
    trash_cmd: Option<&str>,
) -> Result<(usize, usize)>
Expand description

Rotates files in a directory based on retention policies.

ยงErrors

Returns an error if:

  • keep_last is 0 (must be at least 1)
  • The directory cannot be read
  • Files cannot be moved to trash