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

推荐订阅源

P
Proofpoint News Feed
WordPress大学
WordPress大学
Help Net Security
Help Net Security
Jina AI
Jina AI
Security Latest
Security Latest
Y
Y Combinator Blog
Project Zero
Project Zero
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Know Your Adversary
Know Your Adversary
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
博客园 - 司徒正美
MyScale Blog
MyScale Blog
Cyberwarzone
Cyberwarzone
D
Docker
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
C
CERT Recently Published Vulnerability Notes
B
Blog
L
LangChain Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
The Hacker News
The Hacker News
C
Check Point Blog
L
Lohrmann on Cybersecurity
V2EX - 技术
V2EX - 技术
S
Securelist
T
Threat Research - Cisco Blogs
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
云风的 BLOG
云风的 BLOG
Latest news
Latest news
人人都是产品经理
人人都是产品经理
L
LINUX DO - 最新话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The Register - Security
The Register - Security
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
AWS News Blog
AWS News Blog
C
Cybersecurity and Infrastructure Security Agency CISA
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
小众软件
小众软件
T
Tailwind CSS Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
宝玉的分享
宝玉的分享
O
OpenAI News

博客园 - 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