MCPcopy Create free account
hub / github.com/devspace-sh/devspace / untarAll

Function untarAll

helper/server/tar.go:25–43  ·  view source on GitHub ↗
(reader io.ReadCloser, options *UpstreamOptions)

Source from the content-addressed store, hash-verified

23}
24
25func untarAll(reader io.ReadCloser, options *UpstreamOptions) error {
26 defer reader.Close()
27
28 gzr, err := gzip.NewReader(reader)
29 if err != nil {
30 return errors.Errorf("error decompressing: %v", err)
31 }
32 defer gzr.Close()
33
34 tarReader := tar.NewReader(gzr)
35 for {
36 shouldContinue, err := untarNext(tarReader, options)
37 if err != nil {
38 return errors.Wrap(err, "decompress")
39 } else if !shouldContinue {
40 return nil
41 }
42 }
43}
44
45func createAllFolders(name string, perm os.FileMode, options *UpstreamOptions) error {
46 absPath, err := filepath.Abs(name)

Callers 2

UploadMethod · 0.70
TestDownstreamServerFunction · 0.70

Calls 3

untarNextFunction · 0.85
CloseMethod · 0.65
ErrorfMethod · 0.45

Tested by 1

TestDownstreamServerFunction · 0.56