Home | History | Annotate | Download | only in filepath

Lines Matching defs:Walk

337 // visited by Walk. The path argument contains the argument to Walk as a
338 // prefix; that is, if Walk is called with "dir", which is a directory
339 // containing the file "a", the walk function will be called with argument
344 // to handle that error (and Walk will not descend into that directory). If
347 // on a directory, Walk skips the directory's contents entirely.
349 // Walk skips the remaining files in the containing directory.
354 // walk recursively descends path, calling walkFn.
355 func walk(path string, info os.FileInfo, walkFn WalkFunc) error {
362 // If err != nil, walk can't walk into this directory.
363 // err1 != nil means walkFn want walk to skip this directory or stop walking.
364 // Therefore, if one of err and err1 isn't nil, walk will return.
369 // So walk should return whatever walkFn returns.
381 err = walk(filename, fileInfo, walkFn)
392 // Walk walks the file tree rooted at root, calling walkFn for each file or
396 // large directories Walk can be inefficient.
397 // Walk does not follow symbolic links.
398 func Walk(root string, walkFn WalkFunc) error {
403 err = walk(root, info, walkFn)