/// <summary> /// Function to save the HTML of a article to a local file. /// </summary> /// <param name="title">The title of the article to get the html from and the name of file to be saved to</param> /// <returns>Nothing</returns> public async static Task SaveHTMLFileToStorage(string title) { //Debug.WriteLine("Title: " + title); string HTMLText = ""; //Call the API service to get the HTML text from wikipedia HTMLText = await APIServices.GetAllHTMLFromWikipediaArticle(title); //Get the path to the file where it will be stored title = HTMLHandler.ReplaceColons(title); string fileName = Path.Combine(dirPath, (title + ".wik")); //Write to file File.WriteAllText(fileName, HTMLText); //Debug.WriteLine("Wrote To file: " + Path.Combine(dirPath, (title + ".wik"))); }