File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -872,6 +872,21 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
872
872
873
873
< dl id ="path/filepath "> < dt > < a href ="/pkg/path/filepath/ "> path/filepath</ a > </ dt >
874
874
< dd >
875
+ < p > <!-- CL 267887 -->
876
+ The new function
877
+ < a href ="/pkg/path/filepath/WalkDir "> < code > WalkDir</ code > </ a >
878
+ is similar to
879
+ < a href ="/pkg/path/filepath/Walk "> < code > Walk</ code > </ a > ,
880
+ but is typically more efficient.
881
+ The function passed to < code > WalkDir</ code > receives a
882
+ < a href ="/pkg/io/fs/#DirEntry "> < code > fs.DirEntry</ code > </ a >
883
+ instead of a
884
+ < a href ="/pkg/io/fs/#FileInfo "> < code > fs.FileInfo</ code > </ a > .
885
+ (To clarify for those who recall the < code > Walk</ code > function
886
+ as taking an < a href ="/pkg/os/#FileInfo "> < code > os.FileInfo</ code > </ a > ,
887
+ < code > os.FileInfo</ code > is now an alias for < code > fs.FileInfo</ code > .)
888
+ </ p >
889
+
875
890
< p > <!-- CL 264397, golang.org/issues/28614 -->
876
891
The < a href ="/pkg/path/filepath#Match "> < code > Match</ code > </ a > and
877
892
< a href ="/pkg/path/filepath#Glob "> < code > Glob</ code > </ a > functions now
You can’t perform that action at this time.
0 commit comments