MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / Extract

Method Extract

agent/utils/files/zip.go:22–27  ·  view source on GitHub ↗
(ctx context.Context, filePath, dstDir string, secret string)

Source from the content-addressed store, hash-verified

20}
21
22func (z ZipArchiver) Extract(ctx context.Context, filePath, dstDir string, secret string) error {
23 if err := checkCmdAvailability("unzip"); err != nil {
24 return err
25 }
26 return cmd.NewCommandMgr(cmd.WithContext(ctx)).Run("unzip", "-qo", filePath, "-d", dstDir)
27}
28
29func (z ZipArchiver) Compress(ctx context.Context, sourcePaths []string, dstFile string, _ string) error {
30 var err error

Callers

nothing calls this directly

Calls 2

checkCmdAvailabilityFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected