在 Windows 中创建远程资源的驱动器?

发布于 2024-07-20 19:01:21 字数 279 浏览 9 评论 0原文

似乎没有任何好的软件可以将 FTP 安装到本地驱动器号(有关详细信息,请参阅此处 SF问题)所以我在想为什么不自己写它,但我在处理Windows方面(在编程层面)经验很少,所以什么呢会参与做这样的事情吗? 需要做什么才能在“我的电脑”下列出新的“驱动器”? 需要做什么才能获取列出该“驱动器”的 FTP(或其他远程资源)的内容?

There does not appear to be any good software to mount an FTP to a local drive letter (see here for details SF Question) so I was thinking why not just write it myself, but I have very little experience dealing with windows (at the programming level) so what would be involved in doing something like this? What needs to be done to get a new "drive" listed under "My Computer"? What needs to be done to then get the contents of the FTP (or other remote resource) listed that "drive"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独夜无伴 2024-07-27 19:01:21

我最初的想法是您需要编写一个 shell 扩展才能显示您的 FTP 站点,并且最好将其显示为 特殊文件夹。 理想情况下,您的扩展应该使用支持 COM(C++、VB 6 等)的非托管语言编写。 它需要响应以下事件:

  • 用户突出显示服务器上的文件夹
  • 用户双击服务器上的文件夹
  • 用户将文件拖放到服务器上或从服务器上拖放 文件
  • 用户想要与服务器断开连接/重新连接

何时如果拦截这些事件,您将发出适当的 FTP 命令来完成任务(使用 LIST 获取目录的内容、使用 MKD 创建目录、使用 STOR 上传文件等)。 您必须获取这些命令的结果并在 Windows 资源管理器内的文件夹视图和列表视图中显示它们,为此您可能需要近距离接触 Win32 API。 为此,您可以参考 Charles Petzold 的经典书籍Programming Windows。 另请查看有关编写 shell 扩展的教程

这听起来是一个有趣的项目。

My initial thought would be you would need to write a shell extension to be able to show your FTP site, and that it would best be shown as a special folder in Windows Explorer. Your extension would ideally be written in a non-managed language that supported COM (C++, VB 6, etc). It would need to respond to events like:

  • The user highlighting a folder on the server
  • The user double-clicking on a folder on the server
  • The user dragging and dropping files to and from the server
  • The user wanting to disconnect/reconnect from the server

When you intercept these events you would issue the appropriate FTP command to accomplish the task (use LIST to get the contents of a directory, MKD to create a directory, STOR to upload a file, etc). You would have to take the results of these commands and show them in the folders view and the listview within Windows Explorer, and for that you will likely need to get up close and personal with the Win32 API. For that you can turn to books like Charles Petzold's classic Programming Windows. Also check out this tutorial on writing shell extensions.

It sounds like an interesting project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文