如何制作下载器 [英] How to make a downloader

查看:162
本文介绍了如何制作下载器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我制作了一个网络浏览器,并且运行正常,但是我想为此下载一个下载器,例如mozilla firefox的下载器.
最近,我使用了许多源代码来制作下载器,但我想制作一个下载器,该下载器将自动从net获取文件扩展名并将该文件自动保存为其原始格式(例如.mp3,.zip,.docx等). class ="h2_lin">解决方案

这没有任何意义.下载始终会保留文件的全部内容,因此扩展名"(顺便说一句,在现代文件系统中没有扩展名"之类的东西,但是Shell仍然使用带点号的文件名结尾来识别文件类型")没有关系.您只需要一个下载程序,它可以一对一地下载文件,可以选择与URL具有相同的名称或根据URL计算得出的文件.

您真的必须使用VB,甚至不使用VB.NET吗?在2012年?这很难证明.

如果使用.NET,我建议我在CodeProject中使用C#编写的HttpDownloader.我的下载文件可以完全下载部分下载的文件,以防下载被中断(大文件和连接缓慢的常见问题).

—SA


Hello,
i have made a webbrowser and that works perfectly but i want to make a downloader for that like downloader of mozilla firefox.
Recently i have used many source code to make downloader but i want to make downloader that will automatically get extensions of file from net and save that file in its original format(e.g .mp3,.zip,.docx etc.)automatically.

解决方案

It makes no sense. Download always preserves the whole content of the file, so "extension" (by the way, there is no such thing as "extension" in modern file systems, but the end of the file name with the dot is still used by the Shell to recognize "file type") does not matter. You just need a downloader which just download a file, one-to-one, optionally with the same name as URL or calculated on the base of URL.

Do you really have to use VB, not even VB.NET? In 2012? This is hard to justify.

If you used .NET, I would suggest my HttpDownloader written in C# which I offered at CodeProject. My downloaded can complete download of a partially downloaded file in case downloading was interrupted (a very usual problem with big files and slow connection).

—SA


这篇关于如何制作下载器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆