Documentation
¶
Index ¶
- Variables
- func CopyFile(old, new string) error
- func CopyN(writer io.Writer, src io.Reader, size int64) (int64, error)
- func CreatePath(path string) error
- func DecodeFileModifyTime(filename string, lastModifyTime int64, decoder DecodeFunc) (int64, interface{}, error)
- func DirEmpty(path string) bool
- func IsDir(f string) int
- func IsExist(f string) bool
- func IsFile(f string) bool
- func Open(filename string) (*os.File, int64, error)
- func Read(f io.Reader, size int) ([]byte, error)
- func ReadFile(f *os.File) ([]byte, error)
- func ReadFileModifyTime(filename string, lastModifyTime int64) (int64, []byte, error)
- func Write(filename string, src io.Reader, perm os.FileMode) error
- type Base
- type Chunk
- type ChunkResult
- type DecodeFunc
- type Name
- type Path
- type Result
- type Results
- type Stream
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotModified = errors.New("file not modified")
Functions ¶
func CreatePath ¶ added in v1.6.11
func DecodeFileModifyTime ¶ added in v1.8.65
func DecodeFileModifyTime(filename string, lastModifyTime int64, decoder DecodeFunc) (int64, interface{}, error)
func ReadFileModifyTime ¶ added in v1.8.65
Types ¶
type ChunkResult ¶ added in v1.3.45
type DecodeFunc ¶ added in v1.8.65
type Path ¶ added in v1.3.45
type Path struct { Id string `json:"id"` //作品ID: vid-nums, 其它id Product string `json:"product"` //产品名 Biz string `json:"biz"` //业务名 Type string `json:"type"` //类型 Name string `json:"name"` //原始文件名 Ext string `json:"ext"` Md5 string `json:"md5"` SaveType int32 `json:"saveType"` ProductId int64 `json:"productId"` //产品 BizId int64 `json:"bizId"` //业务 Source int32 `json:"source"` //`来源 Size int64 `json:"size"` }
type Result ¶ added in v1.3.45
type Result struct { TaskId string `json:"taskId,omitempty"` Id string `json:"id,omitempty"` //断点续传=UploadId Key string `json:"key"` Url string `json:"url"` Name string `json:"name"` Path string `json:"-"` //本地文件路径 SaveType int32 `json:"saveType"` Duration int64 `json:"duration"` //豪秒 Business interface{} `json:"business,omitempty"` //业务定义数据 }
Click to show internal directories.
Click to hide internal directories.