Esempio n. 1
0
        public static void WriteToFile(string content, string filepath)
        {
            try
            {
                Directory.CreateDirectory("Backups");

                System.IO.File.WriteAllText(filepath, content);
            }
            catch (Exception e)
            {
                StandardMessages.FilePathError(filepath);
            }
        }
Esempio n. 2
0
        public static string ReadFromFile(string filepath)
        {
            try
            {
                string content = System.IO.File.ReadAllText(filepath);
                return(content);
            }
            catch (Exception e)
            {
                StandardMessages.FilePathError(filepath);
            }


            return("");
        }