Example #1
0
        /// <summary>
        /// 转换为文件路径组合器。
        /// </summary>
        /// <param name="filePath">给定的文件路径。</param>
        /// <param name="basePath">给定的基础路径。</param>
        /// <returns>返回 <see cref="FilePathCombiner"/>。</returns>
        public static FilePathCombiner AsFilePathCombiner(this string filePath, string basePath = null)
        {
            var combiner = new FilePathCombiner(filePath);

            if (!basePath.IsEmpty())
            {
                combiner.ChangeBasePath(basePath);
            }

            return(combiner);
        }