github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/moby/volume/mounts/volume_unix.go (about)

     1  // +build linux freebsd darwin
     2  
     3  package mounts // import "github.com/docker/docker/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  }