WeChat.Work.WeDrive.FileManagement (wechat v0.10.0) View Source
微盘-文件管理
Link to this section Summary
Link to this section Types
Specs
file_base64_content() :: String.t()
文件内容base64
Specs
file_id() :: String.t()
Specs
file_id_list() :: [file_id()]
Specs
file_name() :: String.t()
文件名字
Specs
file_type() :: integer()
文件类型
1: 文件夹3: 微文档(文档)4: 微文档(表格)5: 微文档(收集表)
Specs
sort_type() :: integer()
列表排序方式
1: 名字升序2: 名字降序3: 大小升序4: 大小降序5: 修改时间升序6: 修改时间降序
Link to this section Functions
Specs
create( WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), WeChat.Work.WeDrive.SpaceManagement.space_id(), father_id :: file_id(), file_type(), file_name() ) :: WeChat.response()
新建文件/微文档
Specs
delete(WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), file_id_list()) :: WeChat.response()
删除文件
Specs
download(WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), file_id()) :: WeChat.response()
下载文件
Specs
info(WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), file_id()) :: WeChat.response()
文件信息
Link to this function
list(client, userid, space_id, father_id, sort_type \\ 1, start \\ 0, limit \\ 100)
View SourceSpecs
list( WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), WeChat.Work.WeDrive.SpaceManagement.space_id(), father_id :: file_id(), sort_type(), start :: integer(), limit :: 1..1000 ) :: WeChat.response()
获取文件列表
Specs
move( WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), father_id :: file_id(), file_id_list(), replace :: boolean() ) :: WeChat.response()
移动文件
参数说明
replace: 如果移动到的目标目录与需要移动的文件重名时,是否覆盖。
true: 重名文件覆盖false: 重名文件进行冲突重命名处理(移动后文件名格式如xxx(1).txt xxx(1).doc等)
Specs
rename( WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), file_id(), file_name() ) :: WeChat.response()
重命名文件
Link to this function
upload(client, userid, space_id, father_id, file_name, file_base64_content)
View SourceSpecs
upload( WeChat.Work.client(), WeChat.Work.Contacts.User.userid(), WeChat.Work.WeDrive.SpaceManagement.space_id(), father_id :: file_id(), file_name(), file_base64_content() ) :: WeChat.response()
上传文件
注意:只需要填入文件内容的Base64,不需要添加任何如:”data:application/x-javascript;base64” 的数据类型描述信息