MCPcopy
hub / github.com/apache/devlake / CreateZipArchive

Function CreateZipArchive

backend/core/utils/io.go:37–39  ·  view source on GitHub ↗

CreateZipArchive creates a zip archive and writes the files/directories associated with the `sourcePaths` to it. If a sourcePath directory ends with /*, then its contents are copied over, but not the directory itself

(archivePath string, sourcePaths ...string)

Source from the content-addressed store, hash-verified

35// CreateZipArchive creates a zip archive and writes the files/directories associated with the `sourcePaths` to it.
36// If a sourcePath directory ends with /*, then its contents are copied over, but not the directory itself
37func CreateZipArchive(archivePath string, sourcePaths ...string) errors.Error {
38 return createArchive("zip", archivePath, sourcePaths...)
39}
40
41// CreateGZipArchive creates a tar archive, compresses it with gzip and writes the files/directories associated with the `sourcePaths` to it.
42// If a sourcePath directory ends with /*, then its contents are copied over, but not the directory itself

Callers

nothing calls this directly

Calls 1

createArchiveFunction · 0.85

Tested by

no test coverage detected