从FTP下载文件的唯一方法是从FTP下载文件的最佳方式 [英] the best way to download file from FTP only if its different than the one, downloaded

查看:81
本文介绍了从FTP下载文件的唯一方法是从FTP下载文件的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我需要制作一个能够下载FTP文件的功能,但要跳过

重新下载,我需要以某种方式检查已下载的文件是否与一个需要下载,所以我想我会通过检查所有文件的产品版本(所有文件都是.dll,他们有产品版本)来做,但我发现新问题,检查文件产品版本,你需要先下载它,这对我来说没用,所以我需要找到另一种方法来做这个,任何建议如何做到这一点?什么是最快的方式?!



有没有直接访问FTP上的文件?!或者你仍然需要下载它们,然后查看有关它们的信息,例如日期戳,产品版本等......

解决方案

我能看到实现的唯一途径除了解决方案1中建议的索引文件之外,它将比较修改的日期时间。所有其他方法(散列,文件版本等)都需要下载文件。


您能控制源文件夹吗?



您可以构建一个索引文件,其中包含源文件夹中每个文件的所有信息。



如果没有,是否可以将版本添加到文件中命名

basically i need to make a function that will download a file ftom FTP, but to skip
re-downloading, I need somehow to make a check if the already downloaded file is the same as the one that needs to be downloaded, so I thought I will do it by checking the product version of all the files (all the files are .dll and they have product version), but i found new problem, to check the file product version, you need to download it first, which its no use for me, so i need to find another method of doing this, Any suggestion how can this be done? what is the fastest way?!

is there any direct access to the files on FTP?! or still you need to download them and then check information about them for example date stamp, product version and etc...

解决方案

The only way I can see to achieve that, apart from an index file suggested in solution 1, would be to compare datetimes of modification. All other methods (hashing, file version, etc.) require the file to be downloaded.


Have you the control of the source folder?

You could build an index file with all the information of each file in your source folder.

If not, Can you add the version to the file name?


这篇关于从FTP下载文件的唯一方法是从FTP下载文件的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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