mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
parent
c06cf03f0b
commit
08a073a180
30 changed files with 233 additions and 253 deletions
|
|
@ -7,6 +7,7 @@
|
|||
package os
|
||||
|
||||
import (
|
||||
"io"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ const (
|
|||
// nil os.Error. If it encounters an error before the end of the
|
||||
// directory, Readdirnames returns the names read until that point and
|
||||
// a non-nil error.
|
||||
func (f *File) Readdirnames(n int) (names []string, err Error) {
|
||||
func (f *File) Readdirnames(n int) (names []string, err error) {
|
||||
// If this file has no dirinfo, create one.
|
||||
if f.dirinfo == nil {
|
||||
f.dirinfo = new(dirInfo)
|
||||
|
|
@ -63,7 +64,7 @@ func (f *File) Readdirnames(n int) (names []string, err Error) {
|
|||
n -= nc
|
||||
}
|
||||
if n >= 0 && len(names) == 0 {
|
||||
return names, EOF
|
||||
return names, io.EOF
|
||||
}
|
||||
return names, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue