Downloadfile()是否会覆盖旧文件

编程入门 行业动态 更新时间:2024-10-25 22:24:21
本文介绍了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()是否会覆盖旧文件

本文发布于:2023-08-01 08:50:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1266998.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是否会   文件   Downloadfile

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!