Documentation ¶
Overview ¶
Package pcscommand 命令包
Index ¶
- func GetPCSInfo() *baidupcs.PCSApi
- func ReloadIfInConsole()
- func ReloadInfo()
- func RunChangeDirectory(path string, isList bool)
- func RunCopy(paths ...string)
- func RunDownload(testing bool, parallel int, paths []string)
- func RunGetMeta(path string)
- func RunGetQuota()
- func RunLogin(username, password string) (bduss, ptoken, stoken string, err error)
- func RunLs(path string)
- func RunMkdir(path string)
- func RunMove(paths ...string)
- func RunRapidUpload(targetPath, contentMD5, sliceMD5, crc32 string, length int64)
- func RunRemove(paths ...string)
- func RunUpload(localPaths []string, savePath string)
- type ListTask
- type LocalPathInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunChangeDirectory ¶
RunChangeDirectory 执行更改工作目录
func RunDownload ¶
RunDownload 执行下载网盘内文件
func RunRapidUpload ¶
RunRapidUpload 执行秒传文件, 前提是知道文件的大小, md5, 前256KB切片的 md5, crc32
Types ¶
type ListTask ¶
type ListTask struct {
// contains filtered or unexported fields
}
ListTask 队列状态 (基类)
type LocalPathInfo ¶
type LocalPathInfo struct { Path string // 本地路径 File *os.File // 文件 Length int64 // 文件大小 SliceMD5 []byte // 文件前 requiredSliceLen (256KB) 切片的 md5 值 MD5 []byte // 文件的 md5 CRC32 uint32 // 文件的 crc32 }
LocalPathInfo 本地文件详情
func GetFileSum ¶
func GetFileSum(localPath string, sliceMD5Only bool) (lp *LocalPathInfo, err error)
GetFileSum 获取文件的大小, md5, 前256KB切片的 md5, crc32, sliceMD5Only 只获取前256KB切片的 md5
Click to show internal directories.
Click to hide internal directories.