go/src/io
Russ Cox 362d25f2c8 io/fs: add WalkDir
This commit is a copy of filepath.WalkDir adapted to use fs.FS
instead of the native OS file system. It is the last implementation
piece of the io/fs proposal.

The original io/fs proposal was to adopt filepath.Walk, but we
have since introduced the more efficient filepath.WalkDir (#42027),
so this CL adopts that more efficient option instead.

(The changes in path/filepath bring the two copies more in line
with each other. The main change is unembedding the field
in statDirEntry, so that the fs.DirEntry passed to the WalkDirFunc
for the root of the tree does not have any extra methods.)

For #41190.

Change-Id: I9359dfcc110338c0ec64535f22cafb38d0b613a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/243916
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2020-11-06 19:42:05 +00:00
..
fs io/fs: add WalkDir 2020-11-06 19:42:05 +00:00
ioutil io: adopt Discard, NopCloser, ReadAll from io/ioutil 2020-10-20 18:41:16 +00:00
example_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
export_test.go io: unexport ErrBadWriteCount 2020-10-16 17:52:59 +00:00
io.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
io_test.go io: unexport ErrBadWriteCount 2020-10-16 17:52:59 +00:00
multi.go io: export StringWriter 2018-10-03 20:13:35 +00:00
multi_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
pipe.go io: add error check on pipe close functions to avoid error overwriting 2019-08-28 18:35:24 +00:00
pipe_test.go io: add error check on pipe close functions to avoid error overwriting 2019-08-28 18:35:24 +00:00