Commit 9c430339 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: clarify semantics of File methods

There were no docs explaining the meaning of Readdir's count
argument, for instance. Clarify that these mean the same as
the methods on *os.File.

R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/51630043
parent 11740e19
......@@ -52,12 +52,14 @@ type FileSystem interface {
// A File is returned by a FileSystem's Open method and can be
// served by the FileServer implementation.
//
// The methods should behave the same as those on an *os.File.
type File interface {
Close() error
Stat() (os.FileInfo, error)
io.Closer
io.Reader
Readdir(count int) ([]os.FileInfo, error)
Read([]byte) (int, error)
Seek(offset int64, whence int) (int64, error)
Stat() (os.FileInfo, error)
}
func dirList(w ResponseWriter, f File) {
......
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