⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 peutil.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.Controls.Editor
{
    using System;
    using System.Collections;
    using System.IO;

    public sealed class PEUtil
    {
        private PEUtil()
        {
        }

        public static DirectoryInfo CreateDirectory(string path)
        {
            ArrayList list = new ArrayList();
            DirectoryInfo parent = new DirectoryInfo(Path.GetFullPath(path));
            while ((parent != null) && !parent.Exists)
            {
                list.Add(parent.FullName);
                parent = parent.Parent;
            }
            if (parent == null)
            {
                throw new DirectoryNotFoundException("Directory \"" + list[list.Count - 1] + "\" not found.");
            }
            for (int i = list.Count - 1; i >= 0; i--)
            {
                string str = (string) list[i];
                int num2 = NativeMethods._mkdir(str);
                if (num2 != 0)
                {
                    throw new FileNotFoundException(string.Concat(new object[] { "Error calling [msvcrt.dll]:_wmkdir(", str, "), error code: ", num2 }));
                }
            }
            return new DirectoryInfo(path);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -