1
0
mirror of https://github.com/golang/go synced 2024-11-21 15:24:45 -07:00

path/filepath: document that Walk sorts its output

R=golang-dev, cw
CC=golang-dev
https://golang.org/cl/5004045
This commit is contained in:
Rob Pike 2011-09-14 11:18:43 -07:00
parent 4e6f951e6b
commit 7edfcede13

View File

@ -302,7 +302,9 @@ func walk(path string, info *os.FileInfo, walkFn WalkFunc) os.Error {
// Walk walks the file tree rooted at root, calling walkFn for each file or
// directory in the tree, including root. All errors that arise visiting files
// and directories are filtered by walkFn.
// and directories are filtered by walkFn. The files are walked in lexical
// order, which makes the output deterministic but means that for very
// large directories Walk can be inefficient.
func Walk(root string, walkFn WalkFunc) os.Error {
info, err := os.Lstat(root)
if err != nil {