github.com/boynux/docker@v1.11.0-rc4/pkg/chrootarchive/diff.go (about)

     1  package chrootarchive
     2  
     3  import "github.com/docker/docker/pkg/archive"
     4  
     5  // ApplyLayer parses a diff in the standard layer format from `layer`,
     6  // and applies it to the directory `dest`. The stream `layer` can only be
     7  // uncompressed.
     8  // Returns the size in bytes of the contents of the layer.
     9  func ApplyLayer(dest string, layer archive.Reader) (size int64, err error) {
    10  	return applyLayerHandler(dest, layer, &archive.TarOptions{}, true)
    11  }
    12  
    13  // ApplyUncompressedLayer parses a diff in the standard layer format from
    14  // `layer`, and applies it to the directory `dest`. The stream `layer`
    15  // can only be uncompressed.
    16  // Returns the size in bytes of the contents of the layer.
    17  func ApplyUncompressedLayer(dest string, layer archive.Reader, options *archive.TarOptions) (int64, error) {
    18  	return applyLayerHandler(dest, layer, options, false)
    19  }