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