Documentation
¶
Index ¶
- Constants
- func BatchGetFileInfos(accessToken string, fsids []uint64) ([]*bdpan.FileInfo, error)
- func DownloadFileToLocal(accessToken string, f *bdpan.FileInfo) (string, error)
- func GetDirAllFiles(accessToken, dir string) ([]*bdpan.FileInfo, error)
- func GetFileByPath(accessToken, path string) (*bdpan.FileInfo, error)
- func GetFileContentMD5(file *bdpan.FileInfo) (string, error)
- func GetFileInfo(token string, fsid uint64) (*bdpan.FileInfo, error)
- func GetFileInfoView(f *bdpan.FileInfo, args ...any) (string, error)
- func GetFileLocalPath(f *bdpan.FileInfo) (string, error)
- func GetUserDataRoot() (string, error)
- func HasLocalFile(f *bdpan.FileInfo) bool
- func PrintFileInfo(f *bdpan.FileInfo, args ...any) error
- func UploadFile(accessToken, localFilePath, remoteFilePath string, args ...any) (*bdpan.CreateFileRes, error)
- type IsRewrite
- type Printf
Constants ¶
View Source
const (
// 分片大小,4MB,普通用户的最大分片大小
ChunkSize = 4 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func BatchGetFileInfos ¶
func DownloadFileToLocal ¶
下载文件到本地 不超过 1 M的文件
func GetDirAllFiles ¶
GetDirAllFiles 获取目录下的所有文件(通过轮询方式)
func GetFileByPath ¶
根据地址查找文件 在文件目录中循环查找是否有该名称文件
func GetUserDataRoot ¶
func HasLocalFile ¶
func UploadFile ¶
func UploadFile(accessToken, localFilePath, remoteFilePath string, args ...any) (*bdpan.CreateFileRes, error)
uploadFile 实现文件上传的完整流程
Types ¶
Click to show internal directories.
Click to hide internal directories.