func MapAllEqualOrContainingPathMap(m map[string]struct{}, path string, pathType PathType) map[string]struct{} {
	if len(m) == 0 {
		return nil
	}

	pathRoot := stringOSPathSeparator
	if pathType == Relative {
		pathRoot = "."
	}

	n := make(map[string]struct{})
	if _, ok := m[pathRoot]; ok {
		// also covers if path == separator.
		n[pathRoot] = struct{}{}
	}
	for potentialMatch := range m {
		for curPath := path; curPath != pathRoot; curPath = Dir(curPath) {
			if potentialMatch == curPath {
				n[potentialMatch] = struct{}{}
				break
			}
		}
	}
	return n
}
// MapAllEqualOrContainingPathMap returns the paths in m that are equal to, or contain
// path, in a new map.
//
// The path and keys in m are expected to be normalized and validated if Relative is used.
// The path and keys in m are expected to be normalized and absolute if Absolute is used.
//
// If the map is empty, returns nil.
MapAllEqualOrContainingPathMap returns the paths in m that are equal to, or contain
path, in a new map.

The path and keys in m are expected to be normalized and validated if Relative is used.
The path and keys in m are expected to be normalized and absolute if Absolute is used.

If the map is empty, returns nil.
// MapAllEqualOrContainingPathMap returns the paths in m that are equal to or contain // path in a new map . // // The path and keys in m are expected to be normalized and validated if Relative is used . // The path and keys in m are expected to be normalized and absolute if Absolute is used . // // If the map is empty returns nil .
func MapAllEqualOrContainingPathMap(m map[string]struct{}, path string, pathType PathType) map[string]struct{} {
	if len(m) == 0 {
		return nil
	}
	pathRoot := stringOSPathSeparator
	if pathType == Relative {
		pathRoot = "."
	}
	n := make(map[string]struct{})
	if _, ok := m[pathRoot]; ok {
		n[pathRoot] = struct{}{}
	}
	for potentialMatch := range m {
		for curPath := path; curPath != pathRoot; curPath = Dir(curPath) {
			if potentialMatch == curPath {
				n[potentialMatch] = struct{}{}
				break
			}
		}
	}
	return n
}
func MapAllEqualOrContainingPathMap ( m map [ string ] struct { } , path string , pathType PathType ) map [ string ] struct { } { if len ( m ) == 0 { return nil } pathRoot := stringOSPathSeparator if pathType == Relative { pathRoot = " " } n := make ( map [ string ] struct { } ) if _ , ok := m [ pathRoot ] ; ok { n [ pathRoot ] = struct { } { } } for potentialMatch := range m { for curPath := path ; curPath != pathRoot ; curPath = Dir ( curPath ) { if potentialMatch == curPath { n [ potentialMatch ] = struct { } { } break } } } return n }
MapAllEqualOrContainingPathMap returns the paths in m that are equal to, or contain
path, in a new map.
MapAllEqualOrContainingPathMap returns the paths in m that are equal to or contain path in a new map .
// also covers if path == separator.