2010-04-02 02:11:17 -06:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package os
|
|
|
|
|
2012-01-16 22:51:54 -07:00
|
|
|
func (file *File) readdirnames(n int) (names []string, err error) {
|
2011-05-16 10:26:16 -06:00
|
|
|
fis, err := file.Readdir(n)
|
2010-04-13 17:30:11 -06:00
|
|
|
names = make([]string, len(fis))
|
|
|
|
for i, fi := range fis {
|
2011-11-30 10:04:16 -07:00
|
|
|
names[i] = fi.Name()
|
2010-04-13 17:30:11 -06:00
|
|
|
}
|
2011-05-16 10:26:16 -06:00
|
|
|
return names, err
|
2010-04-02 02:11:17 -06:00
|
|
|
}
|