diff options
| author | Ian Lance Taylor <iant@golang.org> | 2022-05-10 16:16:19 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-09-14 14:19:13 +0000 |
| commit | ebbaba281393de259b751779185855001876090a (patch) | |
| tree | ef7acad07fc30b1afd01e5e6d5684c3dbaf6688f /src/path/filepath/path.go | |
| parent | 244127e4b40f3170317ebdb93fa8a92143a54c18 (diff) | |
| download | go-ebbaba281393de259b751779185855001876090a.tar.xz | |
path/filepath: document that WalkDir uses OS paths
Fixes #52812
Change-Id: Idb70d0540bbf9ecdc64293c62a23f07ee3be883c
Reviewed-on: https://go-review.googlesource.com/c/go/+/405615
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Caleb Spare <cespare@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/path/filepath/path.go')
| -rw-r--r-- | src/path/filepath/path.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/path/filepath/path.go b/src/path/filepath/path.go index c86b0c0ff8..64f443a4f7 100644 --- a/src/path/filepath/path.go +++ b/src/path/filepath/path.go @@ -482,6 +482,10 @@ func walk(path string, info fs.FileInfo, walkFn WalkFunc) error { // to walk that directory. // // WalkDir does not follow symbolic links. +// +// WalkDir calls fn with paths that use the separator character appropriate +// for the operating system. This is unlike [io/fs.WalkDir], which always +// uses slash separated paths. func WalkDir(root string, fn fs.WalkDirFunc) error { info, err := os.Lstat(root) if err != nil { |
