public static string ConstructFullPath(params string[] pathes) { var root = FileSystemManager.ApplicationPath(); if (pathes == null || pathes.Length < 1) { return(root); } var dir = new StringBuilder(); dir.Append(root + Path.DirectorySeparatorChar + pathes[0]); for (var i = 1; i < pathes.Length; i++) { var path = pathes[i]; dir.Append(Path.DirectorySeparatorChar + path); } return(dir.ToString()); }
/// <summary> /// Read a file as string (if app, pass FileSystemManager.ApplicationPath() as basepath) /// </summary> /// <param name="path"></param> /// <returns></returns> public static Task <string> ReadLocalFileTextAsync(string path) { return(Task.FromResult(FileSystemManager.ReadLocalFileText(path))); }