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

Function NewTarArchiver

agent/utils/files/tar.go:14–19  ·  view source on GitHub ↗
(compressType CompressType)

Source from the content-addressed store, hash-verified

12}
13
14func NewTarArchiver(compressType CompressType) ShellArchiver {
15 return &TarArchiver{
16 Cmd: "tar",
17 CompressType: compressType,
18 }
19}
20
21func (t TarArchiver) Extract(ctx context.Context, FilePath string, dstDir string, secret string) error {
22 return cmd.NewCommandMgr(cmd.WithContext(ctx)).Run(t.Cmd, t.getOptionStr("extract"), FilePath, "-C", dstDir)

Callers 2

NewShellArchiverFunction · 0.85
NewExtractShellArchiverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected