github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/engine/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  }
    16  
    17  func (p *windowsParser) HasResource(m *MountPoint, absolutePath string) bool {
    18  	return false
    19  }