gpt4 book ai didi

c# - 使用 C# 在 uTorrent 中打开 torrent 文件

转载 作者:行者123 更新时间:2023-11-30 22:39:25 25 4
gpt4 key购买 nike

我正在用 C# .net 创建一个 Windows 服务。在该服务中,我有一个 FileSystemWatcher 检查目录(在我的保管箱中)是否有文件的创建事件。到目前为止没有问题。这个想法是我观察种子文件的创建。然后当在该目录中创建一个 torrent 文件时,我想将它添加到 uTorrent 并开始下载。

windows service,file system watcher,一点问题都没有。我唯一的问题是:如何将 torrent 添加到 uTorrent(或其他 torrent 客户端),或者如何在 C# 中下载 torrent?

我希望我说清楚了:-)

最佳答案

启动默认的 BitTorrent 客户端:

using System.Diagnostics;
using System.IO;

string dirWithTorrent = @"c:\Downloads";

Process.Start(Path.Combine(dirWithTorrent, "example.torrent"));

关于c# - 使用 C# 在 uTorrent 中打开 torrent 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5726760/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com