@@ -944,6 +944,23 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
944
944
already finished.
945
945
</ p >
946
946
947
+ < p > <!-- CL 261540 -->
948
+ The package defines a new type
949
+ < a href ="/pkg/os/#DirEntry "> < code > DirEntry</ code > </ a >
950
+ as an alias for < a href ="/pkg/io/fs/#DirEntry "> < code > fs.DirEntry</ code > </ a > .
951
+ The new < a href ="/pkg/os/#ReadDir "> < code > ReadDir</ code > </ a >
952
+ function and the new
953
+ < a href ="/pkg/os/#File.ReadDir "> < code > File.ReadDir</ code > </ a >
954
+ method can be used to read the contents of a directory into a
955
+ slice of < a href ="/pkg/os/#DirEntry "> < code > DirEntry</ code > </ a > .
956
+ The < a href ="/pkg/os/#File.Readdir "> < code > File.Readdir</ code > </ a >
957
+ method (note the lower case < code > d</ code > in < code > dir</ code > )
958
+ still exists, returning a slice of
959
+ < a href ="/pkg/os/#FileInfo "> < code > FileInfo</ code > </ a > , but for
960
+ most programs it will be more efficient to switch to
961
+ < a href ="/pkg/os/#File.ReadDir "> < code > File.ReadDir</ code > </ a > .
962
+ </ p >
963
+
947
964
< p > <!-- CL 263141 -->
948
965
The package now defines
949
966
< a href ="/pkg/os/#CreateTemp "> < code > CreateTemp</ code > </ a > ,
@@ -953,6 +970,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
953
970
to be used instead of functions defined in the
954
971
< a href ="/pkg/io/ioutil/ "> < code > io/ioutil</ code > </ a > package.
955
972
</ p >
973
+
974
+ < p > <!-- CL 243906 -->
975
+ The types < a href ="/pkg/os/#FileInfo "> < code > FileInfo</ code > </ a > ,
976
+ < a href ="/pkg/os/#FileMode "> < code > FileMode</ code > </ a > , and
977
+ < a href ="/pkg/os/#PathError "> < code > PathError</ code > </ a >
978
+ are now aliases for types of the same name in the
979
+ < a href ="/pkg/io/fs/ "> < code > io/fs</ code > </ a > package.
980
+ Function signatures in the < a href ="/pkg/os/ "> < code > os</ code > </ a >
981
+ package have been updated to refer to the names in the
982
+ < a href ="/pkg/io/fs/ "> < code > io/fs</ code > </ a > package.
983
+ This should not affect any existing code.
984
+ </ p >
956
985
</ dd >
957
986
</ dl > <!-- os -->
958
987
0 commit comments