diff options
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/archive.go | 8 | ||||
| -rw-r--r-- | pkg/pkg.go | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/pkg/archive.go b/pkg/archive.go index 532c0df9..ba7c61b9 100644 --- a/pkg/archive.go +++ b/pkg/archive.go @@ -314,10 +314,10 @@ func (archiveArtifact) IsExclusive() bool { return false } // Revision satisfies [RevisionArtifact] for status behaviour. func (archiveArtifact) Revision() uint64 { return 0 } -// Unpack reads an archive stream from r and unpacks its contents to dir. If +// Extract reads an archive stream from r and writes its contents to dir. If // writeStatus is non-nil, it is called with a user-facing message after -// each successfully unpacked entry. -func Unpack( +// each successfully extracted entry. +func Extract( r io.Reader, dir string, writeStatus func(s string) error, @@ -444,7 +444,7 @@ func (a archiveArtifact) Cure(t *TContext) (err error) { } msg := t.GetMessage() - err = Unpack(r, t.GetWorkDir().String(), func(s string) (err error) { + err = Extract(r, t.GetWorkDir().String(), func(s string) (err error) { msg.Verbose(s) if _, err = io.WriteString(status, s); err != nil { return @@ -2933,6 +2933,9 @@ func Open( return &c, nil } +// Path returns the pathname of the directory holding [Cache] state. +func (c *Cache) Path() *check.Absolute { return c.base } + // Collected is returned by [Collect.Cure] to indicate a successful collection. type Collected struct{} |
