update api
This commit is contained in:
parent
3cacaaad10
commit
8400387d2a
@ -39,13 +39,13 @@ type File interface {
|
|||||||
Seek(offset int64, whence int) (int64, error)
|
Seek(offset int64, whence int) (int64, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFileFromData(path string, data []byte) File {
|
func NewFileFromData(path string, data []byte, modTime time.Time) File {
|
||||||
return &file{
|
return &file{
|
||||||
path: path,
|
path: path,
|
||||||
Meta: make(map[string]interface{}),
|
Meta: make(map[string]interface{}),
|
||||||
reader: bytes.NewReader(data),
|
reader: bytes.NewReader(data),
|
||||||
size: int64(len(data)),
|
size: int64(len(data)),
|
||||||
modTime: time.Now(),
|
modTime: modTime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user