github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/volume/mounts/volume_unix.go (about) 1 //go:build linux || freebsd || darwin 2 // +build linux freebsd darwin 3 4 package mounts // import "github.com/docker/docker/volume/mounts" 5 6 import ( 7 "fmt" 8 "path/filepath" 9 "strings" 10 ) 11 12 func (p *linuxParser) HasResource(m *MountPoint, absolutePath string) bool { 13 relPath, err := filepath.Rel(m.Destination, absolutePath) 14 return err == nil && relPath != ".." && !strings.HasPrefix(relPath, fmt.Sprintf("..%c", filepath.Separator)) 15 }