Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
| ... | ... |
@@ -9,6 +9,9 @@ import ( |
| 9 | 9 |
"github.com/docker/docker/pkg/archive" |
| 10 | 10 |
) |
| 11 | 11 |
|
| 12 |
+// ApplyLayer parses a diff in the standard layer format from `layer`, and |
|
| 13 |
+// applies it to the directory `dest`. Returns the size in bytes of the |
|
| 14 |
+// contents of the layer. |
|
| 12 | 15 |
func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error) {
|
| 13 | 16 |
dest = filepath.Clean(dest) |
| 14 | 17 |
decompressed, err := archive.DecompressStream(layer) |