Commit a60ffed9 authored by Russ Cox's avatar Russ Cox

path/filepath: document that Walk does not follow symlinks

Fixes #4759.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7304043
parent 572d984e
...@@ -374,6 +374,7 @@ func walk(path string, info os.FileInfo, walkFn WalkFunc) error { ...@@ -374,6 +374,7 @@ func walk(path string, info os.FileInfo, walkFn WalkFunc) error {
// and directories are filtered by walkFn. The files are walked in lexical // and directories are filtered by walkFn. The files are walked in lexical
// order, which makes the output deterministic but means that for very // order, which makes the output deterministic but means that for very
// large directories Walk can be inefficient. // large directories Walk can be inefficient.
// Walk does not follow symbolic links.
func Walk(root string, walkFn WalkFunc) error { func Walk(root string, walkFn WalkFunc) error {
info, err := os.Lstat(root) info, err := os.Lstat(root)
if err != nil { if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment