Unverified Commit 6b8782d2 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #13 from jmank88/webfile-abspath

return url as AbsPath from WebFile to implement FileInfo
parents 883a000d 14808cb9
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
"os"
) )
// WebFile is an implementation of File which reads it // WebFile is an implementation of File which reads it
...@@ -61,4 +62,13 @@ func (wf *WebFile) Size() (int64, error) { ...@@ -61,4 +62,13 @@ func (wf *WebFile) Size() (int64, error) {
return wf.contentLength, nil return wf.contentLength, nil
} }
func (wf *WebFile) AbsPath() string {
return wf.url.String()
}
func (wf *WebFile) Stat() os.FileInfo {
return nil
}
var _ File = &WebFile{} var _ File = &WebFile{}
var _ FileInfo = &WebFile{}
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