1 Star 0 Fork 0

lic17 / BaiduPCS-Go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rm_mkdir.go 709 Bytes
一键复制 编辑 原始数据 按行查看 历史
konica 提交于 2018-08-04 22:27 . 更新错误处理, 增加搜索文件
package baidupcs
import (
"github.com/iikira/BaiduPCS-Go/baidupcs/pcserror"
)
// Remove 批量删除文件/目录
func (pcs *BaiduPCS) Remove(paths ...string) (pcsError pcserror.Error) {
dataReadCloser, pcsError := pcs.PrepareRemove(paths...)
if pcsError != nil {
return
}
defer dataReadCloser.Close()
errInfo := pcserror.DecodePCSJSONError(OperationRemove, dataReadCloser)
return errInfo
}
// Mkdir 创建目录
func (pcs *BaiduPCS) Mkdir(pcspath string) (pcsError pcserror.Error) {
dataReadCloser, pcsError := pcs.PrepareMkdir(pcspath)
if pcsError != nil {
return
}
defer dataReadCloser.Close()
errInfo := pcserror.DecodePCSJSONError(OperationMkdir, dataReadCloser)
return errInfo
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/lic17/BaiduPCS-Go.git
git@gitee.com:lic17/BaiduPCS-Go.git
lic17
BaiduPCS-Go
BaiduPCS-Go
v3.5.6

搜索帮助

344bd9b3 5694891 D2dac590 5694891