Documentation ¶
Index ¶
- type CpMvJSON
- type CpMvJSONList
- type FileDirectory
- type FileDirectoryList
- type PCSApi
- func (p PCSApi) Copy(cpmvJSON ...CpMvJSON) (err error)
- func (p PCSApi) FileDownload(path string, ...) (err error)
- func (p PCSApi) FileList(path string) (data FileDirectoryList, err error)
- func (p PCSApi) FilesDirectoriesMeta(path string) (data FileDirectory, err error)
- func (p PCSApi) Mkdir(path string) (err error)
- func (p PCSApi) Move(cpmvJSON ...CpMvJSON) (err error)
- func (p PCSApi) QuotaInfo() (quota, used int64, err error)
- func (p PCSApi) RapidUpload(targetPath, md5, smd5, crc32 string, length int64) (err error)
- func (p PCSApi) Remove(paths ...string) (err error)
- func (p PCSApi) Rename(from, to string) (err error)
- func (p PCSApi) Upload(targetPath string, uploadFunc func(uploadURL string, jar *cookiejar.Jar) error) (err error)
- func (p PCSApi) UploadCreateSuperFile(targetPath string, blockList ...string) (err error)
- func (p PCSApi) UploadTmpFile(targetPath string, uploadFunc func(uploadURL string, jar *cookiejar.Jar) error) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CpMvJSONList ¶
type CpMvJSONList struct {
List []CpMvJSON `json:"list"`
}
CpMvJSONList []CpMvJSON 对象数组
func (CpMvJSONList) String ¶
func (cl CpMvJSONList) String() string
type FileDirectory ¶
type FileDirectory struct { FsID int64 // fs_id Path string // 路径 Filename string // 文件名 或 目录名 Ctime int64 // 创建日期 MD5 string // md5 值 Size int64 // 文件大小 (目录为0) Isdir bool // 是否为目录 Ifhassubdir bool // 是否含有子目录 (只对目录有效) }
FileDirectory 文件或目录的详细信息
func (FileDirectory) String ¶
func (f FileDirectory) String() string
type FileDirectoryList ¶
type FileDirectoryList []FileDirectory
FileDirectoryList FileDirectory 的 数组
func (*FileDirectoryList) Count ¶
func (f *FileDirectoryList) Count() (fileN, directoryN int64)
Count 获取文件总数和目录总数
func (*FileDirectoryList) TotalSize ¶
func (f *FileDirectoryList) TotalSize() int64
TotalSize 获取总文件大小
type PCSApi ¶
type PCSApi struct {
// contains filtered or unexported fields
}
PCSApi 百度 PCS API 详情
func (PCSApi) FileDownload ¶
func (p PCSApi) FileDownload(path string, downloadFunc func(downloadURL string, jar *cookiejar.Jar, savePath string) error) (err error)
FileDownload 下载网盘内文件
func (PCSApi) FileList ¶
func (p PCSApi) FileList(path string) (data FileDirectoryList, err error)
FileList 获取目录下的文件和目录列表
func (PCSApi) FilesDirectoriesMeta ¶
func (p PCSApi) FilesDirectoriesMeta(path string) (data FileDirectory, err error)
FilesDirectoriesMeta 获取单个文件/目录的元信息
可用信息: 是否是目录isdir 是否含有子目录ifhassubdir 修改时间mtime 文件大小size
func (PCSApi) RapidUpload ¶
RapidUpload 秒传文件
func (PCSApi) Upload ¶
func (p PCSApi) Upload(targetPath string, uploadFunc func(uploadURL string, jar *cookiejar.Jar) error) (err error)
Upload 上传单个文件
func (PCSApi) UploadCreateSuperFile ¶
UploadCreateSuperFile 分片上传—合并分片文件
Click to show internal directories.
Click to hide internal directories.