Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

return url as AbsPath from WebFile to implement FileInfo #13

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions webfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"net/http"
"net/url"
"os"
)

// WebFile is an implementation of File which reads it
Expand Down Expand Up @@ -61,4 +62,13 @@ func (wf *WebFile) Size() (int64, error) {
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 _ FileInfo = &WebFile{}