一款简单易用的基础网络通讯组件库。

IDmtpFileTransferActorPullFileResourceInfoAsync(String, String, Metadata, Int32, Int32, CancellationToken) 方法

拉取文件信息。

注意:

  1. 完成该操作后,必须在设定时间(60秒)内至少完成一次文件块访问,不然该信息将变得无效,
  2. 每次该操作,都应该对应一次FinishedFileResourceInfoAsync(String, FileResourceInfo, ResultCode, Metadata, Int32, CancellationToken)

Definition

命名空间: TouchSocket.Dmtp.FileTransfer
程序集: TouchSocket.Dmtp (在 TouchSocket.Dmtp.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
Task<FileResourceInfoResult> PullFileResourceInfoAsync(
	string targetId,
	string path,
	Metadata metadata = null,
	int fileSectionSize = 524288,
	int millisecondsTimeout = 5000,
	CancellationToken token = default
)

参数

targetId  String
目标客户端Id
path  String
资源路径
metadata  Metadata  (Optional)
元数据
fileSectionSize  Int32  (Optional)
文件分块尺寸。
millisecondsTimeout  Int32  (Optional)
超时设置
token  CancellationToken  (Optional)
可取消令箭

返回值

TaskFileResourceInfoResult

[缺少 "M:TouchSocket.Dmtp.FileTransfer.IDmtpFileTransferActor.PullFileResourceInfoAsync(System.String,System.String,TouchSocket.Core.Metadata,System.Int32,System.Int32,System.Threading.CancellationToken)" 的 <returns> 文档]

参见