mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-01 10:36:30 +08:00
Feat: {path} marker in name rule representing the virtual path of the file
This commit is contained in:
@ -33,11 +33,16 @@ func (file FileData) GetFileName() string {
|
||||
return file.Name
|
||||
}
|
||||
|
||||
func (file FileData) GetVirtualPath() string {
|
||||
return file.Name
|
||||
}
|
||||
|
||||
type FileStream struct {
|
||||
File io.ReadCloser
|
||||
Size uint64
|
||||
Name string
|
||||
MIMEType string
|
||||
File io.ReadCloser
|
||||
Size uint64
|
||||
VirtualPath string
|
||||
Name string
|
||||
MIMEType string
|
||||
}
|
||||
|
||||
func (file FileStream) Read(p []byte) (n int, err error) {
|
||||
@ -59,3 +64,7 @@ func (file FileStream) Close() error {
|
||||
func (file FileStream) GetFileName() string {
|
||||
return file.Name
|
||||
}
|
||||
|
||||
func (file FileStream) GetVirtualPath() string {
|
||||
return file.VirtualPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user