mirror of
https://github.com/moby/moby.git
synced 2026-07-12 10:35:14 +00:00
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>
24 lines
840 B
Go
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)
|
|
}
|