Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-files
Commits
6b8782d2
Unverified
Commit
6b8782d2
authored
Mar 20, 2019
by
Steven Allen
Committed by
GitHub
Mar 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13 from jmank88/webfile-abspath
return url as AbsPath from WebFile to implement FileInfo
parents
883a000d
14808cb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
webfile.go
webfile.go
+10
-0
No files found.
webfile.go
View file @
6b8782d2
...
@@ -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
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment