zoukankan      html  css  js  c++  java
  • 转载---C# 递归创建文件夹

    原博客地址:https://blog.csdn.net/xiao_rory/article/details/8058814

    private
    DirectoryInfo createImgFolder(string filefullpath) { DirectoryInfo dir = null; if (!File.Exists(filefullpath)) { //string dirpath = filefullpath.Substring(0, filefullpath.LastIndexOf('\')); string[] pathes = filefullpath.Split('\'); if (pathes.Length > 1) { string path = pathes[0]; for (int i = 1; i < pathes.Length; i++) { path += "\" + pathes[i]; if (!Directory.Exists(path)) { dir = Directory.CreateDirectory(path); } } } } return dir; }

    运行:
    参数:D:workspace-marsimgserverIMGPATHImgFiles20190531
     
  • 相关阅读:
    sqlServer的主键只能自增不能手动增加
    TP函数
    TP复习17
    TP复习16
    TP复习15
    TP复习14
    TP复习13
    TP复习12
    TP复习11
    TP复习10
  • 原文地址:https://www.cnblogs.com/xlaxx/p/10984388.html
Copyright © 2011-2022 走看看