Downloadfile()是否会覆盖旧文件 [英] Downloadfile() will overwrite the old file or not

查看:154
本文介绍了Downloadfile()是否会覆盖旧文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用System.Net.Webclient类的Downloadfile()方法将服务器中存在的文件下载到本地目录.我想知道它是否会覆盖现有文件.
我的观察:新文件中的时间戳显示为旧文件.

除了My.Computer.Network.Downloadfile()以外,是否有其他方法可以使用覆盖选项下载文件?

预先感谢,
Vijay

Hi,

I am using Downloadfile() method of System.Net.Webclient class to download file present in server to local directory. I want to know whether it will overwrite the existing file or not.
My Observation: Time stamp in the new file is shown as old file.

Is there any method to download file with overwrite option other than My.Computer.Network.Downloadfile()?

Thanks in advance,
Vijay

推荐答案

如社区内容中所述,它将覆盖文件(如果存在).
http://msdn.microsoft.com/en-us/library/ez801hhe (v = VS.80).aspx [
As it says in Community Content, it will overwrite the file if it exists.
http://msdn.microsoft.com/en-us/library/ez801hhe(v=VS.80).aspx[^]
Talking about time stamp, it will have same Created stamp. You should check Modified stamp.


这篇关于Downloadfile()是否会覆盖旧文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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