Files
moby/pkg/chrootarchive/diff.go
Sebastiaan van Stijn 524a63a958 pkg/chrootarchive: remove "// import" comments
These comments were added to prevent users from accidentally
importing using the wrong module name, but they don't have
an effect when working in go modules mode.

Remove the comments in preparation of moving this package
to a separate module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-19 22:27:40 +01:00

24 lines
840 B
Go

package chrootarchive
import (
"io"
"github.com/docker/docker/pkg/archive"
)
// ApplyLayer parses a diff in the standard layer format from `layer`,
// and applies it to the directory `dest`. The stream `layer` can only be
// uncompressed.
// Returns the size in bytes of the contents of the layer.
func ApplyLayer(dest string, layer io.Reader) (size int64, err error) {
return applyLayerHandler(dest, layer, &archive.TarOptions{}, true)
}
// ApplyUncompressedLayer parses a diff in the standard layer format from
// `layer`, and applies it to the directory `dest`. The stream `layer`
// can only be uncompressed.
// Returns the size in bytes of the contents of the layer.
func ApplyUncompressedLayer(dest string, layer io.Reader, options *archive.TarOptions) (int64, error) {
return applyLayerHandler(dest, layer, options, false)
}