]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: document that Walk sorts its output
authorRob Pike <r@golang.org>
Wed, 14 Sep 2011 18:18:43 +0000 (11:18 -0700)
committerRob Pike <r@golang.org>
Wed, 14 Sep 2011 18:18:43 +0000 (11:18 -0700)
R=golang-dev, cw
CC=golang-dev
https://golang.org/cl/5004045

src/pkg/path/filepath/path.go

index 668d20fa133094a395c00177443dea9b3f069861..c40d9ff56448e5f86eba23501658e64aba62d465 100644 (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 {