Commit b6862446 authored by Dmitry Mottl's avatar Dmitry Mottl Committed by Brad Fitzpatrick

net/http: add godoc for Dir.Open function

This commit adds godoc for Dir.Open function.

Change-Id: Ibc3b22f38660a082802e1f868c5cf9d880fc2801
GitHub-Last-Rev: 774cfd7d8cc61989179956e47d51451135b6c203
GitHub-Pull-Request: golang/go#30353
Reviewed-on: https://go-review.googlesource.com/c/163437Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c3c90d01
...@@ -63,6 +63,8 @@ func mapDirOpenError(originalErr error, name string) error { ...@@ -63,6 +63,8 @@ func mapDirOpenError(originalErr error, name string) error {
return originalErr return originalErr
} }
// Open implements FileSystem using os.Open, opening files for reading rooted
// and relative to the directory d.
func (d Dir) Open(name string) (File, error) { func (d Dir) Open(name string) (File, error) {
if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) { if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) {
return nil, errors.New("http: invalid character in file path") return nil, errors.New("http: invalid character in file path")
......
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