56c5c4f (parent fdac5a3)5/14/2026, 11:10:51 AM
.cr
Crystal
(text/x-crystal)
require "./api_client_wrapper"
require "./api/models/container"

# Interact with a single container that exists on a docker client.
class Docker::Archive
  include Docker::ApiClientWrapper

  def initialize(@client : Docker::Api::ApiClient, id : String)
  end

  # Method to get an archive from container
  def get(path : String)
    @client.get_archive @id, path
  end

  # Method to send an archive to container
  def put(path : String, archive : Bytes)
    @client.put_archive @id, path, archive
  end
end