layerid.go 248 字节
Newer Older
S
stormgbs 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
package wclayer

import (
	"path/filepath"

	"github.com/Microsoft/go-winio/pkg/guid"
)

// LayerID returns the layer ID of a layer on disk.
func LayerID(path string) (guid.GUID, error) {
	_, file := filepath.Split(path)
	return NameToGuid(file)
}