Sha256: d5f1bfbf6d6d05396431c9f8e23700829d618a25fecf44ae31bb79678225afd9

Contents?: true

Size: 599 Bytes

Versions: 20

Compression:

Stored size: 599 Bytes

Contents

require "imap/backup/serializer/directory"
require "imap/backup/serializer/folder_maker"

module Imap; end

module Imap::Backup
  class Account; end

  class Account::FolderEnsurer
    attr_reader :account

    def initialize(account:)
      @account = account
    end

    def run
      raise "The backup path for #{account.username} is not set" if !account.local_path

      Serializer::FolderMaker.new(
        base: File.dirname(account.local_path),
        path: File.basename(account.local_path),
        permissions: Serializer::Directory::DIRECTORY_PERMISSIONS
      ).run
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
imap-backup-14.4.1 lib/imap/backup/account/folder_ensurer.rb
imap-backup-14.4.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-14.3.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-14.2.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-14.1.1 lib/imap/backup/account/folder_ensurer.rb
imap-backup-14.1.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-14.0.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-13.4.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-13.3.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-13.2.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-13.1.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-13.0.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-12.1.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-12.0.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-11.1.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-11.1.0.rc1 lib/imap/backup/account/folder_ensurer.rb
imap-backup-11.0.1 lib/imap/backup/account/folder_ensurer.rb
imap-backup-11.0.0 lib/imap/backup/account/folder_ensurer.rb
imap-backup-11.0.0.rc1 lib/imap/backup/account/folder_ensurer.rb
imap-backup-10.0.1 lib/imap/backup/account/folder_ensurer.rb