func IsPathInDir(dir, pathToCheck string) bool {
	rel, err := filepath.Rel(dir, pathToCheck)

	if err == nil {
		if !strings.HasPrefix(rel, "..") {
			return true
		}
	}

	return false
}
// IsPathInDir returns true if pathToCheck is within dir.
IsPathInDir returns true if pathToCheck is within dir.
// IsPathInDir returns true if pathToCheck is within dir .
func IsPathInDir(dir, pathToCheck string) bool {
	rel, err := filepath.Rel(dir, pathToCheck)
	if err == nil {
		if !strings.HasPrefix(rel, "..") {
			return true
		}
	}
	return false
}
func IsPathInDir ( dir , pathToCheck string ) bool { rel , err := filepath . Rel ( dir , pathToCheck ) if err == nil { if ! strings . HasPrefix ( rel , " " ) { return true } } return false }
IsPathInDir returns true if pathToCheck is within dir.
IsPathInDir returns true if pathToCheck is within dir .