mirror of
https://github.com/AlistGo/alist.git
synced 2025-11-25 03:15:10 +08:00
perf: optimize IO read/write usage (#8243)
* perf: optimize IO read/write usage * . * Update drivers/139/driver.go Co-authored-by: MadDogOwner <xiaoran@xrgzs.top> --------- Co-authored-by: MadDogOwner <xiaoran@xrgzs.top>
This commit is contained in:
@@ -2,6 +2,7 @@ package model
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -48,7 +49,8 @@ type FileStreamer interface {
|
||||
RangeRead(http_range.Range) (io.Reader, error)
|
||||
//for a non-seekable Stream, if Read is called, this function won't work
|
||||
CacheFullInTempFile() (File, error)
|
||||
CacheFullInTempFileAndUpdateProgress(up UpdateProgress) (File, error)
|
||||
SetTmpFile(r *os.File)
|
||||
GetFile() File
|
||||
}
|
||||
|
||||
type UpdateProgress func(percentage float64)
|
||||
|
||||
Reference in New Issue
Block a user