Commit fc821667 authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Rob Pike

os: change Readdirnames doc to follow that of Readdir

The two methods act the same, so make their documentation similar so
that people don't think they act differently.

Change-Id: If224692ef50870faf855d789380a614d1e724132
Reviewed-on: https://go-review.googlesource.com/c/go/+/188137Reviewed-by: default avatarRob Pike <r@golang.org>
parent d178c588
...@@ -26,7 +26,10 @@ func (f *File) Readdir(n int) ([]FileInfo, error) { ...@@ -26,7 +26,10 @@ func (f *File) Readdir(n int) ([]FileInfo, error) {
return f.readdir(n) return f.readdir(n)
} }
// Readdirnames reads and returns a slice of names from the directory f. // Readdirnames reads the contents of the directory associated with file
// and returns a slice of up to n names of files in the directory,
// in directory order. Subsequent calls on the same file will yield
// further names.
// //
// If n > 0, Readdirnames returns at most n names. In this case, if // If n > 0, Readdirnames returns at most n names. In this case, if
// Readdirnames returns an empty slice, it will return a non-nil error // Readdirnames returns an empty slice, it will return a non-nil error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment