You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: backup_store.rb
    path of file: ./repos/discourse/lib/backup_restore
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module BackupRestore
  # @abstract
  class BackupStore
    BackupFileExists = Class.new(RuntimeError)
    StorageError 
    
    def delete_prior_to_n_days
      window = SiteSetting.remove_older_backups.to_i
      return unless window && window.is_a?(Numeric) && window > 0
      return unless cleanup_allowed?
      files.each do |file|
        delete_file(file.filename) if file.last_modified < Time.now.ago(window.days)
      end
      reset_cache
    end