本文介绍了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
推荐答案如社区内容中所述,它将覆盖文件(如果存在). msdn.microsoft/en-us/library/ez801hhe (v = VS.80).aspx [ ^ ] 谈论时间戳,它将具有相同的Created戳.您应该检查Modified印章. As it says in Community Content, it will overwrite the file if it exists. msdn.microsoft/en-us/library/ez801hhe(v=VS.80).aspx[^] Talking about time stamp, it will have same Created stamp. You should check Modified stamp.
更多推荐
Downloadfile()是否会覆盖旧文件
发布评论