zoukankan      html  css  js  c++  java
  • 把一种类型的多个文件合并成一个文件的控制台程序

    static void Main(string[] args)
            {
                string currentDirectory = Environment.CurrentDirectory;
                string[] files = Directory.GetFiles(currentDirectory, "*.sql");
                string path = Path.Combine(currentDirectory, "all.sql");
                using (FileStream stream = File.Create(path))
                {
                    stream.Dispose();
                }
                foreach (string str3 in files)
                {
                    string str4 = Path.Combine(currentDirectory, str3);
                    if (path.ToLower() != str4.ToLower())
                    {
                        string contents = File.ReadAllText(str4, Encoding.UTF8) + "\r\n";
                        File.AppendAllText(path, contents);
                    }
                }
                }
  • 相关阅读:
    kafka-->storm-->mongodb
    zuul filter
    使用Spring Cloud Feign
    kafka客户端发布record(消息)
    kafka java api消费者
    kafka java api生产者
    kafka安装和使用
    多线程分析
    springboot入门
    centos7上svn安装
  • 原文地址:https://www.cnblogs.com/scottpei/p/2068586.html
Copyright © 2011-2022 走看看