From 39bafed1021a49d7fd7458a34989601a8493f79a Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor Minor changes to the library
TODO: complete this section
+ The implementation of the
+ io/fs.FileInfo
+ interface returned by
+ Header.FileInfo
+ now implements a String
method that calls
+ io/fs.FormatFileInfo
.
+
+ The implementation of the
+ io/fs.FileInfo
+ interface returned by
+ FileHeader.FileInfo
+ now implements a String
method that calls
+ io/fs.FormatFileInfo
.
+
+ The implementation of the
+ io/fs.DirEntry
+ interface returned by the
+ io/fs.ReadDirFile.ReadDir
+ method of the
+ io/fs.File
+ returned by
+ Reader.Open
+ now implements a String
method that calls
+ io/fs.FormatDirEntry
.
+
@@ -430,6 +469,13 @@
TODO: https://go.dev/cl/483235: embed: implement openFile.ReadAt
+ +
+ Calling FS.Open.Stat
+ will return a type that now implements a String
+ method that calls
+ io/fs.FormatFileInfo
.
+
- TODO: https://go.dev/issue/54451: standard implementations of FileInfo and DirEntry should implement fmt.Stringer -
-@@ -541,8 +579,25 @@
- TODO: https://go.dev/cl/489555: io/fs: add FormatFileInfo and FormatDirEntry functions; modified api/next/54451.txt +
+ The new
+ FormatFileInfo
+ function returns a formatted version of a
+ FileInfo
.
+ The new
+ FormatDirEntry
+ function returns a formatted version of a
+ DirEntry
.
+ The implementation of
+ DirEntry
+ returned by
+ ReadDir
now
+ implements a String
method that calls
+ FormatDirEntry
,
+ and the same is true for
+ the DirEntry
+ value passed to
+ WalkDirFunc
.
+ The implementation of the
+ io/fs.DirEntry
+ interface returned by the
+ ReadDir
function and
+ the File.ReadDir
+ method now implements a String
method that calls
+ io/fs.FormatDirEntry
.
+
+ The implementation of the
+ io/fs.DirEntry
+ interface passed to the function argument of
+ WalkDir
+ now implements a String
method that calls
+ io/fs.FormatDirEntry
.
+
+ Calling Open.Stat
+ will return a type that now implements a String
+ method that calls
+ io/fs.FormatFileInfo
.
+