是不是下了tgpdnf游戏文件检查慢不要点检查文件

我玩dota是在11对战平台,下载了玩不了是咋回事?上面写“请检查游戏文件是否正确”咋回事_百度知道
我玩dota是在11对战平台,下载了玩不了是咋回事?上面写“请检查游戏文件是否正确”咋回事
方便截个图上来看看吗。 按PrtScr Sysrq那个按钮截取 该按键在F12 右侧三个一排里面的其中一个 。按一下然后在QQ聊天窗口点粘贴 然后右键另存为什么什么照片 再传上来
采纳率:65%
为您推荐:
其他类似问题
dota的相关知识
等待您来回答C#下载文件时,怎么先去判断目标文件是否存在?-学网-中国IT综合门户网站-提供健康,养生,留学,移民,创业,汽车等信息
> 信息中心 >
C#下载文件时,怎么先去判断目标文件是否存在?
来源:互联网 发表时间: 2:01:02 责任编辑:鲁晓倩字体:
为了帮助网友解决“C#下载文件时,怎么先去判断目标文件是否存在?”相关的问题,学网通过互联网对“C#下载文件时,怎么先去判断目标文件是否存在?”相关的解决方案进行了整理,用户详细问题包括:
protected void LinDown1_Click(object sender, EventArgs e)
Work w1 = DalFactory.Factory.GetBLWork().GetWorkByWID(int.Parse(Request[&WID&]));
if (w1 != null)
string filePath = Server.MapPath(&~...
程序就会出错,但是如果我把目标文件删除了.UrlEncode(LinDown1;写到输出流中 } }我这样下载文件没有问题.GetWorkByWID(&#47,就正常下载.TransmitFile(filePath).Text)); R + Server, &filename=&) + LinDown1;WID&文件路径 R.FUploadedWorks/Content-Disposition&quot.AddHeader(&~// &#47.T&/&quot, EventArgs e) { Work w1 = DalFactory.WID + & + w1,存在!= null) { string filePath = S if (w1 ;])).Parse(Request[&quot.GetBLWork()protected void LinDown1_Click(object sender!各位大侠帮忙.MapPath(&quot,所以我必须在下载前判断一下目标文件是否存在,我在线等待,不存在就提示要下载的文件可能 已经被删除;&#47
,具体解决方案如下:解决方案1:UploadedWorks&#47.UrlEncode(LinDown1;Content-Disposition& + S写到输出流中}else{ R&quot.Text.Write(&//判断文件是否存在{ R + w1.AddHeader(&quot.IO;文件路径if(File.WID + &/&#47string filePath = Server, & R /&#47.Exists(filePath))/&quot.MapPath(&quot.TransmitFile(filePath););filename=&;}记得using System.Text));不存在该文件&~/) + LinDown1解决方案2:
在File类中有方法可以判断File.Exists(string path),这个path是路径,在服务器上的文件的完整路径。File在System.IO这个命名空间下。
解决方案3:
最简单的方法就是套个try{}catch{}
解决方案4:
StreamWriter sw = File.AppendText(Server.MapPath(&.&)+&\\myText.txt&);
sw.WriteLine(&追逐理想&);
sw.WriteLine(&kzlll&);
sw.WriteLine(&.NET笔记&);
sw.Flush();
sw.Close();
C#拷贝文件
string OrignFile,NewF
OrignFile = Server.MapPath(&.&)+&\\myText.txt&;
NewFile = Server.MapPath(&.&)+&\\myTextCopy.txt&;
File.Copy(OrignFile,NewFile,true);
C#删除文件
string delFile = Server.MapPath(&.&)+&\\myTextCopy.txt&;
File.Delete(delFile);
C#移动文件
string OrignFile,NewF
OrignFile = Server.MapPath(&.&)+&\\myText.txt&;
NewFile = Server.MapPath(&.&)+&\\myTextCopy.txt&;
File.Move(OrignFile,NewFile);
C#创建目录
// 创建目录c:\sixAge
DirectoryInfo d=Directory.CreateDirectory(&c:\\sixAge&);
// d1指向c:\sixAge\sixAge1
DirectoryInfo d1=d.CreateSubdirectory(&sixAge1&);
// d2指向c:\sixAge\sixAge1\sixAge1_1
DirectoryInfo d2=d1.CreateSubdirectory(&sixAge1_1&);
// 将当前目录设为c:\sixAge
Directory.SetCurrentDirectory(&c:\\sixAge&);
// 创建目录c:\sixA...
15 16 /52 53 /&#47!= null) 18 {19&#47.GetFileName(file));i &//C#移动文件 string OrignF/)); ///最后修改时间;/yyyymmddhhmmss&/49 50 /取得要拷贝的文件夹名 string strFolderName = strFromPath.CreateSubdirectory(&BackColor='/文件类型&) - 1); /58 sw.N/动态添加单元格内容35 td = new TableCell();) + 1; } } catch (Exception e) { MessageBox.CreateDirectory(&quot.OpenWrite())52 {53 ///103 tr.Cells.Default).LastIndexOf(&quot. 格式.GetFileSystemEntries(srcPath);Script runat=server&gt:\\createHTML/创建文件信息对象48 FileInfo finfo = new FileInfo(fname);指定要生成的HTML文件40 string fname = S///**&#47.Close();//$htmlkey[&/).&quot.CreateDirectory(&quot!Directory.IO.GetFiles(strFromPath),3).Add(new LiteralControl(&99 td.ToString(););/);/ + strFolderName + &43**&#47.Flush();kzlll&/ + ZiPath[j];//65 }66 catch(Exception err)67 { 68 R ======================================================/summary&///TXT&quot, SeekOrigin.GetEncoding(&quot.Delete (aimPath+P/写入------------------------------------“并换行38 & &**/sixAge\18 txtC/递归删除文件夹及文件 &29 DirectoryI & string[] fileList = D101 td = new TableCell();追逐理想&quot.PostedF/ /\ d2指向c.GetFileSystemInfos())55 {56 FileName = &64 hyCreateF//\//summary&\22 }23 }24 catch(Exception err)25 {26 /summary&gt.Replace(&quot.Text = strCurD\设置文件的扩展名为&\&如果目标文件夹中没有源文件夹则在目标文件夹中创建源文件夹 if (;**/)).IO&\j++) { / sw.OpenOrC\;从指定的目录以打开或者创建的形式读取日志文件7 FileStream fs = new FileStream(S/ NewFile = S//如果文件夹不存在则提示 }protected void Page_Load (O20 }21 sr.Add(new LiteralControl(FileS\&#47.ReadLine()) ;/**&#47.DirectorySeparatorCmyT//26 lblCurD\&#47.&&#47.Length &/&#47,FileExt.Copy(strFiles[i];param&gt,删除之后无法恢复;&#92:&#92,NewFile);&#92.txt&quot.Flush(); C#拷贝文件 string OrignF\;sixAge1 DirectoryInfo d1=d;%@ Import namespace=&quot.DirectorySeparatorChar) aimPath += P 否则直接Delete文件 else { File.LastIndexOf(&**/27 }28 FileI**/&#47.ToLongTimeString();]&sixAge1& } } //82 83 /1112 /&#47:&#92.GetDirectories();91 }92 93 &#47.Write(&c;循环拷贝文件 for(int i = 0;96/ April 18April2005 In STU&#47.MapPath(&&#47.SetCurrentDirectory(&/创建只写文件流19 using(FileStream fs = finfo.Exists(dir)) &#47.Add(td);/summary&)+& NewFile = S33 34 /主要内容3536 &#47,true表示覆盖同名文件 Fr\param name=&\/param name=&quot.Show (e;&#47,则创建 if (;**/4private void ReadFromTxtFile()5{6 if(fileP&#47.N/param&开始拷贝文件.N)); &lt.ToString(&95 td = new TableCell();&#47.html&/1011 if(fileExtN } else R为标记数组赋值30 newContent[0] = txtT4private void ReadLogFile()5{6 &#47.Write(& 否则直接Copy文件 else File.ToString());**/104 td = new TableCell();//&#47,NewF.Write(&\105取得文件的扩展名69 FileExt =));**&#47.Text = fileStream.FileName!= &)+1;&#47.Text = strCurD/&#47, FileAccess.MapPath(&/根据上面创建的文件流创建写数据流54 StreamWriter sw = new StreamWriter(fs.CreateSubdirectory(&quot,该里面是包含文件以及目录路径的一个数组 &#47.ToString();/&#47.Now.Exists(d)) F) - 1);;45 }46}五.创建HTML文件1/ /把得到的子文件夹当成新的源文件夹;为上面创建的文件流创建读取数据流16 StreamReader read = new StreamReader(fs);)+&---------------------------------------------------public static void CopyFolder(string strFromP108 }109}三.读取日志文件1&#47.ToString(&i++) { //&#47.Add(new LiteralControl(&;&#92,32 DateT&#47.txt&/指定日志文件的目录8 string fname = S/29 30 /\/37 d1指向c; -1) 23 {24 &#47.LastIndexOf(&/100&55 56 //\sixAge\&#47.ToString()+&/ &#47StreamWriter sw = F/根据上面新的内容生成html文件37 try38 {39 /&#47.Peek() &sixAge2 D&#47.txt&31 TableR&#47.C;/ DeleteFolder(Dir);**/ // &#47,NewF定义文件信息对象10 FileInfo finfo = new FileInfo(fname);文件名&quot.Delete (aimP)+&n&/38 td = new TableCell();\/删除已空文件夹 R; sw.N60 }61 62 /yyyymmddhhmmss&)+&sixAge& //&&#47.BaseS创建StreamReader对象12 using (StreamReader sr = new StreamReader(S /&quot.LastWriteT///{0} {1} &#92.DirectorySeparatorC取得文件的最后修改时间75 FileModify =59txt&) + & // &替换html模版文件里的标记为新的内容43 for(int i=0;针对当前目录建立目录引用对象51 DirectoryInfo dirInfo = new DirectoryInfo(txtCurD\/summary&;判断文件是否存在以及是否大于2K13 if (30 TableCell td.Length-1] ;.BaseStream.Add(new LiteralControl(FileName));// /sixAge2\\&#92.WriteLine(&quot.Copy(OrignFile:\ 该文件夹不存在& } /\)).Length = 0;&#47:\创建数组保存源文件夹下的文件名 string[] strFiles = Directory.Add(td);/ 先当作目录处理如果存在这个目录就递归Delete该目录下面的文件 if(D文件夹&quot,S &#47.Write(&summary&/&#47.N&quot.WriteLine(strhtml).C**/&// /\动态添加表格内容94 tr = new TableRow().Text = strCurD + strFolderName); //&#47:明天去要饭 QQ;& 获取文件列表3/64 65 /**//)+&/59 60 /写入日志内容并换行35 &#47.Add(new LiteralControl(&**/// string[] fileList = Directory.ReadLine() + & 得到源目录的文件列表;\&quot.MapPath(&20 21 /&#92:\4private void CreateHtmlFile()5{ 6 &#47.MapPath(&20 txtCurD&quot,true);%&\)+&);递归删除子文件夹 } D&#47.Substring(strFiles[i];文件大小&//11&/删除该文件16sixAge2\**/41 42 &#47.&quot.Text,FileN.Controls.GetFileName(file));/107 tableDirI获取所有子文件夹名 string strZiPath = strFromPath + & ======================================================//------------------------------------\ 写入日志文件3/89 &#47.C**///createHTML&; ======================================================public static void DeleteDir(string aimPath){ try { /**// F2/**&#47.Exists(file)) CopyDir(11 12 //返回读到的日志文件内容32 return output!D/&#47:/;&#47.txt&;7 8 /&#47,strToPath + &quot,E41 td = new TableCell().C根据上面创建的文件流创建写数据流22 StreamWriter w = new StreamWriter(fs);**/ April 18April2005 In STU/**/&#47。/ 读取日志文件3/&#92.Cells。&#47.Delete().LastIndexOf(& /\文件夹&quot.ReadToEnd(); & /D;/ }}&#47,strFromP初始化时;\输出异常信息27 R 检查目标目录是否以目录分割字符结束如果不是则添加之 if(aimPath[aimPath.R28 }29 /\/&#ff0000&如果是文件61 if(fsi is FileInfo)62 {63 fi = (FileInfo)fsi.Copy(yyyymmddhhmmss&quot.Close();/ && fileExtN } &#47.Substring(strFromPath.L20 }21 }22 }二.获取文件列表1///&#47.D&#47.Close();/// F// 测试的时候要小心操作.&quot.MapPath(&//**&#47.html&quot.Write(dir+&取得源文件夹下的所有子文件夹名称 DirectoryInfo[] ZiPath = dirI &lt.E&&#47.CreateDirectory(strFromPath);&#47.C/100px&**/**&#47.Add(td);25 txtCurD&#47.ToString(&/\&upedFile&quot.&67 68 &#47.Move(OrignF&#47,strFiles[i];sixAge DirectoryInfo d=D/upedFile&17 18 /14 15 //2/myTextC如果源文件夹不存在;&#47.&quot.Add(td).MapPath(&// F**/) + &);summary&&#47.Text = DateT 检查目标目录是否以目录分割字符结束如果不是则添加之 if(aimPath[aimP/) +&\**/57 FileExt = &/&#47: &30 31 &#47.Append(/;sixAge\请选择文本文件&/删除文件夹 S设置写数据流的起始位置为文件流的末尾25 读取文本文件3/sixAge1_1 DirectoryInfo d2=d1;定义和html标记数目一致的数组7 string[] newContent = new string[5];33}四.写入日志文件1/**/**/// 如果你指向Delete目标文件下面的文件而不包含目录请使用下面的方法 /取得目录名84 FileName = dir.Close();**&#47,EventArgs e) { string Dir=& &lt.Add(new LiteralControl(FileM39&#47.Add(new LiteralControl(&quot.Controls.Close();gbook\取得文件的大小72 FileSize = fi,NewFile:--------------------------------------------------/myTextCopy.html&读取指定的HTML文件模板17 while ((oneline =\;strToPath&102 OrignFile = S76 }7778 //字体颜色33 newContent[3] = & &106////&#47.DirectorySeparatorChar) aimPath += P关闭写数据流44&#47.FileNi & ZiP/**&#47.Write(dir+&quot.Add(td).GetFiles(srcPath).ToString()).Begin);取得目录的最后修改时间87 FileModify =97/)+&\/19 fileS/以打开或者写入的形式创建文件流51 using(FileStream fs =//如果存在这个文件夹删除之 { foreach(string d in D &summary&/)+&/&#47.OpenWrite())20 {21 /&#47.Show (e.C 实现一个静态方法将指定文件夹下面的所有内容copy到目标文件夹下面/n&/&85 86 /26 27 &#47.CreateDirectory(&/);)) 13 {14 Ssummary&/\/**/sixAge2&n&quot.Add(tr).C/;**&#47.NET笔记& &lt.N/写入“Log E 创建目录c;&#47!= P);**&#47.MapPath(&\input&&/+DateT\param&取文件的一行内容并换行25 &C#删除文件 string delFile = S&#47.Delete(delFile); } /&#47,strToPath + & ======================================================public static void CopyDir(string srcPath.GetFileSystemEntries(dir)) { if(F/**/ public void DeleteFolder(string dir) { if (D**/n&quot.Seek(0;\).Delete(d);**/&quot.ToString());90 FileExt = &/\ 创建目录c;/**/&#47.Exists(aimPath)) D//**/88 89 &#47.C98 td = new TableCell();46 }47 ////**&#47,newContent[i]):ss&/&#47:\&#47.Add(td);))).Flush();& for (int j = 0;//&quot,aimPath+P&summary& }}需要引用命名空间;%@ Page Language=C#%&/&#47。 string strFileName = strFiles[i];作者;42写入当前系统时间并换行31///**/+i+&summary&gt,true),只取文件名;5private void WriteLogFile(string input)6{ 7 /2/4private void GetFileList()5{6 string strCurD//\&#47!= P/\&#92.Exists &&设置超级链接的属性63 hyCreateF4748 tableDirI/设置当前流的起始位置为文件流的起始点19 拷贝文件夹(包括子文件夹)到指定文件夹下;&#47.Cells,string aimPath){ try { &#47.CreateDirectory(aimPath).Extension.Exists(strFromPath)) { D;背景色32 newContent[2] = &/&#92.Rlogfile.MapPath(&8 StringBuilder strhtml = new StringBuilder();myText.Read);定义输出字符串10 StringBuilder output = new StringBuilder(); /&#47.Length-1] ;**/ 5;初始化15 if(.Close();42 43 /读取文件22 while ()+& &//4/ + strFolderName).PostedF;.L / //17 }18 /\/ 将当前目录设为c;&#47.AppendText(Server.&清空缓冲区内容;/**/ 遍历所有的文件和目录 foreach(string file in fileList) { &#47.C&#47.Length - strFiles[i];&#47:using System,从头开始新一轮的拷贝 CopyFolder(strZiPath.Length - strFromPath.MapPath(&/.Delete(dir); 判断目标目录是否存在如果不存在则新建之 if(.txt&quot.ToLongDateString()).Substring(txtFileP&&**/&#47.html&字体大小34 newContent[4] = txtC/36 37 /**//&#47.CreateDirectory(strToPath + &quot,aimPath+P 创建目录c,true);;sixAge&#92,该里面是包含文件以及目录路径的一个数组 &#47.L初始化该字符串的长度为013sixAge&yyyy-mm-\//创建DirectoryInfo实例 DirectoryInfo dirInfo = new DirectoryInfo(strFromPath);**// 实现一个静态方法将指定文件夹下面的所有内容Detele//2&#47,源文件夹和目标文件夹均需绝对路径; 先当作目录处理如果存在这个目录就递归Copy该目录下面的文件 if(D文件大小9 long FileSize.MapPath(&33 34 &#47.Seek(0; + DateTnLog E最后修改时间&14 }15 else16 {17 StreamReader fileStream = new StreamReader(txtFileP9 /23 24 /
/ OrignFile = S9 try 10 {11 &#47.Text); &//sixAge1\///&#47.Text = strCurD1314 /)); } /sixAge1_1&10 11 /标题31 newContent[1] = &);**//&#47.Add(td);) + 1;\取得拷贝的文件名;字节&&#47.IO ;58 FileSize = 0;&#47, SeekO/strFromPath&sixAge Directory.Add(new LiteralControl(FileExt));46)7 {8 txtFilePath =fileP//#cccfff&#39.&49 50 &#47!=& 得到源目录的文件列表;;/j &**/&#47.LastIndexOf(&);System.Exists(strToPath + &**// 遍历所有的文件和目录 foreach(string file in fileList) { /2/45//i++)44 {45/\/).GetFileName(file)), DateT /summary&/)12 {13 Response.Controls!= &**//);**&#47.txt&GB2312& string[] fileList = D否则是目录79 else80 {81 dir = (DirectoryInfo)sixAge2_1 D/ string[] fileList = D**///70 71 &#47.Append(oneline);&#47!IsPostBack)16 {17 /**//把新的内容写到创建的HTML页面中57&#47,string strToPath){ /c;&&#47.T///73 74 /&#47.txt&19 lblCurD36///**&#47,地址截掉;.Write (.T/**&#47.Text.Add(td);39 40 /40;/)!Directory.Controls:\//32 tr = new TableRow(); }}一.读取文本文件1/).ToString());); &);**&#47.Write(input + &/12 DateTime FileM9 fileExtName = txtFileP.End); + strFileN/**&#47.Write(/ 如果目标文件夹为只读属性就会报错;param name=&直接删除其中的文件 else DeleteFolder(d););&#47.GetFiles(aimPath);21 }22 else23 {24 strCurDir = txtCurD &myText,true);调用函数删除文件夹 }&#47,目标文件夹); 文件夹删除成功&quot.txt&createHTML&quot.MapPath(&quot.Add(tr);//;/sixAge2_1&C#创建目录 &#47,默认为当前页面所在的目录18 strCurDir = SmyTextC 创建HTML文件3// &lt,并把缓冲区内容写入基础流41 } catch (Exception e) { MessageB; 如果你指向copy目标文件下面的文件而不包含目录请使用下面的方法 &#47.WriteLine(&&#47.ToString(&**&#47.GetFileSystemEntries(aimPath);/) + &关闭释放读数据流29/26 }27 28 &#47: ”28 w.Exists(file)) { DeleteDir(aimPath+P&#47.NavigateUrl = &quot.LastWriteT/循环判断当前目录下的文件和目录54 foreach(FileSystemInfo fsi in dirInfo: CopyFolder(源文件夹;44 td = new TableCell();; + strFolderName)) { D;& strF/取得文件名66 FileName = fi, FileM&#47.WriteLine(&quot:\**/).GetFileName(file);;**&#47
10个回答5个回答5个回答3个回答5个回答16个回答4个回答2个回答1个回答1个回答1个回答1个回答1个回答1个回答1个回答1个回答1个回答1个回答
相关文章:
最新添加资讯
24小时热门资讯
Copyright © 2004- All Rights Reserved. 学网 版权所有
京ICP备号-1 京公网安备02号梦幻西游手游“下载不到patch文件,请检查网络”解决办法
  梦幻手游很多玩家最近遇到了&下载不到patch文件,请检查网络&的问题,游戏不能更新,我们来看看这个问题怎么解决吧。
  问题描述:梦幻手游维护完毕后,别人都能进,部分玩家却进不去。游戏重新卸载安装,一直不行,我是WIFI。
  解决方法:
  1、我上次也是一样,换个网络就好了。
  2、点确定再打开继续,不停的重复就好了。
  3、关机,再开机,不是重启。然后换成流量下载就可以了。
相关游戏推荐
下载地址:
下载地址:
下载地址:
cdec大师赛积分排名查询
cdec联赛排名查询
不要不要的是什么意思
摸臀杀是什么梗
iphone8真机曝光
18587人推荐
3.3分休闲益智
23736人推荐
0.0分角色扮演
32191人推荐
8.0分角色扮演
41464人推荐
3.6分角色扮演
51215人推荐
5.5分角色扮演
6681人推荐
7.5分角色扮演
7482人推荐
6.7分角色扮演
8381人推荐
8.3分角色扮演
9923539人推荐
9.3分视频播放
10650175人推荐
8.8分生活应用
1381人推荐
8.3分角色扮演
2176人推荐
8.0分动作冒险
3255人推荐
8.0分角色扮演
8.0分角色扮演
8.0分角色扮演
8.0分角色扮演
72191人推荐
8.0分角色扮演
8.0分休闲益智
9116人推荐
10.0分视频播放
101550人推荐
10.0分学习帮助为什么文件检查一直下载进不去
全部答案(共1个回答)
补丁包更新吧,自动的太慢了。
怎么理算火灾、爆炸、自燃损失险...
大约15分钟
从新下载或魔道刷图就是高智力。所以你要加满点燃 给你一套我的加点吧,本人70天津一区的贫民魔道 4亲全满,点燃满,冰车满,电塔满,炉子满,改星...
第一种方法,到DNF的安装目录打开TenSafe.exe,在开游戏 第二种,把游戏文件夹下start/TenProtect中的TenSLX。dat和TenSLX...
应该是DNF安装包有问题了
大家还关注
确定举报此问题
举报原因(必选):
广告或垃圾信息
激进时政或意识形态话题
不雅词句或人身攻击
侵犯他人隐私
其它违法和不良信息
报告,这不是个问题
报告原因(必选):
这不是个问题
这个问题分类似乎错了
这个不是我熟悉的地区

我要回帖

更多关于 正在检查游戏文件 的文章

 

随机推荐