archive

package
v0.1.0-dev.20260307210248 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package archive provides archive extraction actions for the operation graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	op.ProviderBase
}

Provider provides archive extraction actions.

+devlore:access=both

func (*Provider) CompensateExtract

func (p *Provider) CompensateExtract(state Tombstone) error

CompensateExtract removes files created during extraction, then cleans up empty directories under dest.

func (*Provider) Extract

func (p *Provider) Extract(source, prefix file.Resource) (file.Resource, Tombstone, error)

Extract extracts an archive (tar.gz or zip) from source into the prefix directory. The archive format is detected from the file extension. Returns compensation state with the list of created files.

Parameters:

  • source: file resource identifying the archive file (tar.gz, tgz, or zip)
  • prefix: file resource identifying the extraction directory

type Tombstone

type Tombstone struct {
	op.TombstoneBase
	Dest         string
	CreatedFiles []string
}

Tombstone holds archive-specific compensation state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL