• For WeiWei Server Code


    using System; using System.IO; using System.Collections.Generic; public class MyClass { public static void Main() { //Get all Drivers String[] logDrivers = Environment.GetLogicalDrives(); foreach(string temp in logDrivers) { Console.WriteLine(temp); } SearchBase.addSubDirectory(new DirectoryInfo(logDrivers[logDrivers.Length-3]), "*.*"); Console.WriteLine(SearchBase.ra); Console.ReadKey(); } } public class SearchBase { private SearchBase() { } public static int ra; public static void addSubDirectory(DirectoryInfo directory,string pattern) { foreach (FileInfo fi in directory.GetFiles(pattern)) { addrelativeDocument(fi.FullName); } foreach (DirectoryInfo di in directory.GetDirectories()) { addSubDirectory(di,pattern); } } public static void addrelativeDocument(string path) { // string html; // using (StreamReader sr = new StreamReader(path, System.Text.Encoding.Default)) // { // html = sr.ReadToEnd(); // } // string time=DateTime.Now.ToLongTimeString(); // string[] timetopath=time.Split(':'); // string newtime=null; // for(int i=0;i
  • 相关阅读:
    swift基础语法(05- 可选值)
    swift基础语法(03- 运算符)
    swift基础语法(04- 元组)
    swift基础语法(02-基本数据类型)
    tableView的全屏穿透效果的实现
    ScrollView属性解析
    TableView的重要性
    SQLite操作
    openFileOutput的几种文件模式
    保存文件到SDcard
  • 原文地址:https://www.cnblogs.com/williamzhao/p/2410614.html
Copyright © 2020-2023  润新知