C#创建临时文件夹方法

region 创建临时文件夹

        string strMapPath = Server.MapPath("~/");
        string strTempFilesPath = Path.Combine(strMapPath, "TempFilesPath");
        string tempFolder = Path.Combine(strTempFilesPath, Guid.NewGuid().ToString());
        if (Directory.Exists(tempFolder) == false)
            Directory.CreateDirectory(tempFolder);
        #endregion

你可能感兴趣的:(C#创建临时文件夹方法)