aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-09-14 11:18:43 -0700
committerRob Pike <r@golang.org>2011-09-14 11:18:43 -0700
commit7edfcede1303b498b55d261d35eb4c98901edc4b (patch)
tree5e7e1d720754ea495c87e117527c957a8a891abd /src/pkg/path
parent4e6f951e6bbb6dba96b7d88c7f959b08440457ac (diff)
downloadgo-7edfcede1303b498b55d261d35eb4c98901edc4b.tar.xz
path/filepath: document that Walk sorts its output
R=golang-dev, cw CC=golang-dev https://golang.org/cl/5004045
Diffstat (limited to 'src/pkg/path')
-rw-r--r--src/pkg/path/filepath/path.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/path/filepath/path.go b/src/pkg/path/filepath/path.go
index 668d20fa13..c40d9ff564 100644
--- a/src/pkg/path/filepath/path.go
+++ b/src/pkg/path/filepath/path.go
@@ -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 {