//public static Task<string> ReadFileToStringAsync(string fullPath) //{ //} public static string ReadFileToString(string fullPath) { var bytes = FileIoHelper.ReadBytes(fullPath); //Convert to string string retVal; if (!TryGetString(bytes, out retVal)) { retVal = string.Format("{0} {1}", fullPath, retVal); } return(retVal); }
public static void WriteStringToFileAsBytes(string data, string fullPath) { var tmp = Encoding.UTF8.GetBytes(data); FileIoHelper.WriteData(fullPath, tmp); }