layerid.go 252 B

1234567891011121314
  1. package wclayer
  2. import (
  3. "path/filepath"
  4. "github.com/Microsoft/hcsshim/internal/guid"
  5. )
  6. // LayerID returns the layer ID of a layer on disk.
  7. func LayerID(path string) (guid.GUID, error) {
  8. _, file := filepath.Split(path)
  9. return NameToGuid(file)
  10. }