public static void WriteText(string filePath, ECharset charset, string content)
        {
            DirectoryUtils.CreateDirectoryIfNotExists(DirectoryUtils.GetDirectoryPath(filePath));

            StreamWriter sw = new StreamWriter(filePath, false, ECharsetUtils.GetEncoding(charset));

            sw.Write(content);
            sw.Flush();
            sw.Close();
        }
        public static void AppendText(string filePath, ECharset charset, string content)
        {
            DirectoryUtils.CreateDirectoryIfNotExists(DirectoryUtils.GetDirectoryPath(filePath));

            using (FileStream fs = new FileStream(filePath, FileMode.Append, FileAccess.Write))
            {
                using (StreamWriter sw = new StreamWriter(fs, ECharsetUtils.GetEncoding(charset)))
                {
                    sw.Write(content);
                }
            }
        }