示例#1
0
 public static string GetEnvParamMoonResPath()
 {
     return(PathEx.Normalize(GetEnvParam("MoonResPath")));
 }
示例#2
0
 /// <summary>
 /// 获取文件名
 /// </summary>
 /// <param name="path"></param>
 /// <param name="separator"></param>
 /// <returns></returns>
 public static string GetFileName(string path, char separator = '/')
 {
     path = PathEx.MakePathStandard(path);
     return(path.Substring(path.LastIndexOf(separator) + 1));
 }
示例#3
0
 public static string GetEnvParamMoonClientConfigPath()
 {
     return(PathEx.Normalize(GetEnvParam("MoonClientConfigPath")));
 }
示例#4
0
 /// <summary>
 /// 获取文件夹名
 /// </summary>
 /// <param name="fileName"></param>
 /// <returns></returns>
 public static string GetDirectoryName(string fileName)
 {
     fileName = PathEx.MakePathStandard(fileName);
     return(fileName.Substring(0, fileName.LastIndexOf('/')));
 }