惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
H
Help Net Security
P
Privacy & Cybersecurity Law Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Help Net Security
Help Net Security
Hugging Face - Blog
Hugging Face - Blog
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V2EX - 技术
V2EX - 技术
人人都是产品经理
人人都是产品经理
L
LINUX DO - 最新话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google Online Security Blog
Google Online Security Blog
博客园 - 聂微东
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Blog — PlanetScale
Blog — PlanetScale
C
Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Know Your Adversary
Know Your Adversary
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
Webroot Blog
Webroot Blog
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Register - Security
The Register - Security
Simon Willison's Weblog
Simon Willison's Weblog
A
Arctic Wolf
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
Y
Y Combinator Blog
Last Week in AI
Last Week in AI
S
Securelist
Cloudbric
Cloudbric
G
GRAHAM CLULEY
M
MIT News - Artificial intelligence
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Visual Studio Blog
S
Schneier on Security
Engineering at Meta
Engineering at Meta

博客园 - zhengfeng

GridView 72般绝技 链接打开固定大小的新窗口 iframe传值和自适应高度 页面传参 小技巧 js表单验证控制代码大全 - zhengfeng - 博客园 自己写的递归方法复制文件夹里面的内容(从源文件(里面可以有多个层次的子文件夹)到一个文件夹) 递归写的复制文件夹及其下的内容(原样复制) JS取得URL中的参数值 自己写的将文件从多个文件合并到一个文件夹的小方法 使用 Hashtable 集合(一) MessageBox.Show用法 Math.floor和Math.ceil函数 Document对象 javascript小技巧 JavaScript的学习 正则表达式的学习: 工作小结: DataList分页
System.IO.File类和System.IO.FileInfo类
zhengfeng · 2007-07-03 · via 博客园 - zhengfeng

1.bool exist = System.IO.Directory.Exists(cfg.XmlProductPath+@"\mobile\");  //判断文件夹是否存在
2.Directory.CreateDirectory(cfg.XmlProductPath + @"\mobile\"); //创建mobile文件夹
3.string[] dirs = null;
   dirs = Directory.GetFiles(cfg.XmlProductPath + @"\mobile\"); //返回mobile文件夹下的文件名称
4.FileInfo fileInfo = new FileInfo(dirs[i]);    //获取文件信息(含路径的包装)
   string rawurl = fileInfo.Name;    //获取文件名
5.string path = Application.StartupPath + "\\page.html"; //获取启动了应用程序的可执行文件的路径(不包括可执行文件的名称)
6.bool IsFileExist = File.Exists(path);  //判断文件是否存在
7. File.WriteAllText(path, txtSnatch.Text, Encoding.GetEncoding(mymission.CharSet)); //创建一个新文件,向其中写入指定编码的字符串,然后关闭文件
8.System.Diagnostics.Process.Start("IEXPLORE.EXE", path0;//用IE打开指定路径的文件
   System.Diagnostics.Process.Start("notepad.EXE", path);//用记事本打开指定路径的文件

网上搜集文章内容:http://www.cnblogs.com/shj0633/archive/2007/01/18/623708.html