volume_unix.go 439 B

123456789101112131415161718
  1. // +build linux freebsd darwin
  2. package volume
  3. import (
  4. "fmt"
  5. "path/filepath"
  6. "strings"
  7. )
  8. func (p *linuxParser) HasResource(m *MountPoint, absolutePath string) bool {
  9. relPath, err := filepath.Rel(m.Destination, absolutePath)
  10. return err == nil && relPath != ".." && !strings.HasPrefix(relPath, fmt.Sprintf("..%c", filepath.Separator))
  11. }
  12. func (p *windowsParser) HasResource(m *MountPoint, absolutePath string) bool {
  13. return false
  14. }