在 Windows 中创建远程资源的驱动器?
似乎没有任何好的软件可以将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最初的想法是您需要编写一个 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:
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.