MCPcopy Index your code
hub / github.com/coder/coder / writeTarArchive

Function writeTarArchive

archive/archive.go:125–139  ·  view source on GitHub ↗
(w io.Writer, zipReader *zip.Reader, maxSize int64)

Source from the content-addressed store, hash-verified

123}
124
125func writeTarArchive(w io.Writer, zipReader *zip.Reader, maxSize int64) error {
126 tarWriter := tar.NewWriter(&limitedWriter{
127 w: w,
128 remaining: maxSize,
129 })
130
131 for _, file := range zipReader.File {
132 err := processFileInZipArchive(file, tarWriter)
133 if err != nil {
134 return err
135 }
136 }
137
138 return tarWriter.Close()
139}
140
141func processFileInZipArchive(file *zip.File, tarWriter *tar.Writer) error {
142 fileReader, err := file.Open()

Callers 1

CreateTarFromZipFunction · 0.85

Calls 2

processFileInZipArchiveFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected