code: func (d *FileSelectDialog) fileFitsMask(finfo os.FileInfo) bool {
  	if finfo.IsDir() {
  		return true
  	}
  
  	if d.selectDir {
  		return false
  	}
  
  	if len(d.fileMasks) == 0 {
  		return true
  	}
  
  	for _, msk := range d.fileMasks {
  		if msk == "*" || msk == "*.*" {
  			return true
  		}
  
  		matched, err := filepath.Match(msk, finfo.Name())
  		if err == nil && matched {
  			return true
  		}
  	}
  
  	return false
  }
docs: // Checks if the file name matches the mask. Empty mask, *, and *.* match any file