zoukankan      html  css  js  c++  java
  • 递归获取文件夹下特定文件

    public void ReadFilePath(string path)
            {
                string[] dirs = Directory.GetFileSystemEntries(path);//获取文件目录和文件名
                for (int i = 0; i<dirs.Length; i++)
                {
                    if (Directory.Exists(dirs[i]))//如果是文件夹,则进行递归调用
                    {
                        ReadFilePath(dirs[i]);
                    }
                    else
                    {
                        if (Path.GetFileName(dirs[i]) == "xxx.yyy")
                        {

            }
                    }
                }
            }

  • 相关阅读:
    linux基础指令(下)
    Linux基础命令(中)
    wtforms校验组件
    Linux基础命令(上)
    Scrapy
    SQLAlchemy
    自定义命令
    flask-session
    解决Failed to allocate memory: 8转
    如何做需求
  • 原文地址:https://www.cnblogs.com/mol1995/p/10993929.html
Copyright © 2011-2022 走看看