module

YandexDisk::Retention

Decides which remote backups have aged out.

Kept deliberately free of I/O so the rules — the part that deletes data — can be tested exhaustively without touching a real Disk.

Class methods

expired(resources : Enumerable(Resource), policy : RetentionConfig, now : Time = Time.utc) : Array(Resource)

Returns the files in resources that policy no longer keeps, newest first excluded and oldest first in the result.

Directories are never returned: retention prunes backup files, and taking out a directory would take its contents with it.

Source