Implement archive.Apply on Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
Darren Stahl
2017-12-08 15:16:24 -08:00
parent c71bee7b8a
commit c195ebb3e2
7 changed files with 528 additions and 96 deletions

View File

@@ -3,6 +3,7 @@
package archive
import (
"context"
"os"
"sync"
"syscall"
@@ -128,3 +129,9 @@ func getxattr(path, attr string) ([]byte, error) {
func setxattr(path, key, value string) error {
return sysx.LSetxattr(path, key, []byte(value), 0)
}
// apply applies a tar stream of an OCI style diff tar.
// See https://github.com/opencontainers/image-spec/blob/master/layer.md#applying-changesets
func apply(ctx context.Context, root string, tr *tar.Reader, options ApplyOptions) (size int64, err error) {
return applyNaive(ctx, root, tr, options)
}