summaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
blob: 443596fbaaf18a4fc14c78cc8fb6e7500d92212d (plain)
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)
}