Skip to content

Commit

Permalink
x/http/fs: dataFile/stream/httpFile.FullName
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Sep 3, 2023
1 parent 511e80d commit e936ec1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions http/fs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func (p *dataFile) Name() string {
return path.Base(p.name)
}

func (p *dataFile) FullName() string {
return p.name
}

func (p *dataFile) Size() int64 {
return p.ContentReader.Size()
}
Expand Down
8 changes: 8 additions & 0 deletions http/fs/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func (p *stream) Name() string {
return path.Base(p.name)
}

func (p *stream) FullName() string {
return p.name
}

func (p *stream) Stat() (fs.FileInfo, error) {
return p, nil
}
Expand Down Expand Up @@ -150,6 +154,10 @@ func (p *httpFile) Name() string {
return path.Base(p.name)
}

func (p *httpFile) FullName() string {
return p.name
}

func (p *httpFile) Stat() (fs.FileInfo, error) {
return p, nil
}
Expand Down

0 comments on commit e936ec1

Please sign in to comment.