Lines Matching refs:ent
245 for _, ent := range ents {
246 matched, err := filepath.Match(pattern, ent.name)
251 matches = append(matches, dir+ent.name)
304 func (op findOpName) apply(w evalWriter, path string, ent dirent) (bool, bool) {
305 matched, err := filepath.Match(string(op), ent.name)
318 func (op findOpType) apply(w evalWriter, path string, ent dirent) (bool, bool) {
319 mode := ent.lmode
320 if op.followSymlinks && ent.mode != 0 {
321 mode = ent.mode
330 func (op findOpRegular) apply(w evalWriter, path string, ent dirent) (bool, bool) {
331 mode := ent.lmode
332 if op.followSymlinks && ent.mode != 0 {
333 mode = ent.mode
342 func (op findOpNot) apply(w evalWriter, path string, ent dirent) (bool, bool) {
343 test, prune := op.op.apply(w, path, ent)
349 func (op findOpAnd) apply(w evalWriter, path string, ent dirent) (bool, bool) {
352 test, p := o.apply(w, path, ent)
367 func (op findOpOr) apply(w evalWriter, path string, ent dirent) (bool, bool) {
368 test, prune := op.op1.apply(w, path, ent)
372 return op.op2.apply(w, path, ent)
377 func (op findOpPrune) apply(w evalWriter, path string, ent dirent) (bool, bool) {
383 func (op findOpPrint) apply(w evalWriter, path string, ent dirent) (bool, bool) {
386 name = ent.name
387 } else if ent.name == "." {
390 name = filepathJoin(path, ent.name)
404 for _, ent := range ents {
405 glog.V(3).Infof("find: path:%s ent:%s depth:%d", path, ent.name, depth)
406 _, prune := fc.apply(w, path, ent)
407 mode := ent.lmode
410 lpath := filepathJoin(path, ent.name)
411 if p, ok := seen[ent.id]; ok {
416 seen[ent.id] = lpath
418 mode = ent.mode
421 glog.V(3).Infof("find: not dir: %s/%s", path, ent.name)
432 c.find(w, fc, filepathJoin(path, ent.name), ent.id, depth+1, seen)
507 func (fc findCommand) apply(w evalWriter, path string, ent dirent) (test, prune bool) {
510 test, p = op.apply(w, path, ent)
518 glog.V(2).Infof("apply path:%s ent:%v => test=%t, prune=%t", path, ent, test, prune)
850 for _, ent := range ents {
851 if ent.mode.IsDir() {
852 if fc.isPrune(ent.name) {
853 glog.V(3).Infof("findleaves prune %s in %s", ent.name, dir)
856 subdirs = append(subdirs, ent)
863 if ent.name == fc.name {
864 glog.V(2).Infof("findleaves %s in %s", ent.name, dir)
865 w.writeWordString(filepathJoin(dir, ent.name))