package ociwclayer

import "github.com/Microsoft/hcsshim/internal/ociwclayer"

Package ociwclayer provides functions for importing and exporting Windows container layers from and to their OCI tar representation.

Index

Functions

func ExportLayer

func ExportLayer(w io.Writer, path string, parentLayerPaths []string) error

ExportLayer writes an OCI layer tar stream from the provided on-disk layer. The caller must specify the parent layers, if any, ordered from lowest to highest layer.

The layer will be mounted for this process, so the caller should ensure that it is not currently mounted.

func ImportLayer

func ImportLayer(r io.Reader, path string, parentLayerPaths []string) (int64, error)

ImportLayer reads a layer from an OCI layer tar stream and extracts it to the specified path. The caller must specify the parent layers, if any, ordered from lowest to highest layer.

The caller must ensure that the thread or process has acquired backup and restore privileges.

This function returns the total size of the layer's files, in bytes.

Source Files

export.go import.go

Version
v0.8.2
Published
Nov 27, 2018
Platform
js/wasm
Imports
10 packages
Last checked
14 minutes ago

Tools for package owners.