@@ -17,16 +17,11 @@ var SkipDir = errors.New("skip this directory")
17
17
// WalkDirFunc is the type of the function called by WalkDir to visit
18
18
// each file or directory.
19
19
//
20
- // The path argument contains the argument to Walk as a prefix.
21
- // That is, if Walk is called with root argument "dir" and finds a file
20
+ // The path argument contains the argument to WalkDir as a prefix.
21
+ // That is, if WalkDir is called with root argument "dir" and finds a file
22
22
// named "a" in that directory, the walk function will be called with
23
23
// argument "dir/a".
24
24
//
25
- // The directory and file are joined with Join, which may clean the
26
- // directory name: if Walk is called with the root argument "x/../dir"
27
- // and finds a file named "a" in that directory, the walk function will
28
- // be called with argument "dir/a", not "x/../dir/a".
29
- //
30
25
// The d argument is the fs.DirEntry for the named path.
31
26
//
32
27
// The error result returned by the function controls how WalkDir
@@ -42,9 +37,9 @@ var SkipDir = errors.New("skip this directory")
42
37
//
43
38
// WalkDir calls the function with a non-nil err argument in two cases.
44
39
//
45
- // First, if the initial os.Lstat on the root directory fails, WalkDir
40
+ // First, if the initial fs.Stat on the root directory fails, WalkDir
46
41
// calls the function with path set to root, d set to nil, and err set to
47
- // the error from os.Lstat .
42
+ // the error from fs.Stat .
48
43
//
49
44
// Second, if a directory's ReadDir method fails, WalkDir calls the
50
45
// function with path set to the directory's path, d set to an
0 commit comments