diff options
Diffstat (limited to 'lib/gitlab/import_export/after_export_strategies/move_file_strategy.rb')
-rw-r--r-- | lib/gitlab/import_export/after_export_strategies/move_file_strategy.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/import_export/after_export_strategies/move_file_strategy.rb b/lib/gitlab/import_export/after_export_strategies/move_file_strategy.rb new file mode 100644 index 00000000000..2e3136936f8 --- /dev/null +++ b/lib/gitlab/import_export/after_export_strategies/move_file_strategy.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Gitlab + module ImportExport + module AfterExportStrategies + class MoveFileStrategy < BaseAfterExportStrategy + def initialize(archive_path:) + @archive_path = archive_path + end + + private + + def strategy_execute + FileUtils.mv(project.export_file.path, @archive_path) + end + end + end + end +end |