You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: validator.go
    path of file: ./repos/moby/vendor/github.com/tonistiigi/fsutil
    
    the code of the file until where you have to start completion: package fsutil

import (
	"os"
	"path/filepath"
	"sort"
	"strings"
	"syscall"

	"github.com/pkg/errors"
)

type parent struct {
	dir  string
	last string
}

type Validator struct {
	parentDirs []parent
}

func (v *Validator) HandleChange(kind ChangeKind, p string, fi os.FileInfo, err 
    
func ComparePath(p1, p2 string) int {
	// byte-by-byte comparison to be compatible with str<>str
	min := min(len(p1), len(p2))
	for i := 0; i < min; i++ {
		switch {
		case p1[i] == p2[i]:
			continue
		case p2[i] != filepath.Separator && p1[i] < p2[i] || p1[i] == filepath.Separator:
			return -1
		default:
			return 1
		}
	}
	return len(p1) - len(p2)
}