using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OfficeAppHelp.Help
{
    public static class PathHelp
    {
        /// <summary>
        /// 更改文件名不包含扩展名
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static string ChangeFileNameWithoutExtension(string path, string fileName)
        {
            var n1 = Path.GetExtension(path);
            var n2 = Path.GetDirectoryName(path);
            var n3 = Path.GetFileNameWithoutExtension(fileName);
            var n4 = Path.Combine(n2, n3 + n1);
            return n4;
        }
    }
}
