summaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
blob: 90df3bedceb65b507867689d144204cba14acbaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package wclayer

import (
	"path/filepath"

	"github.com/Microsoft/hcsshim/internal/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)
}