public static WriteAllText ( string p_strPath, string p_strData ) : void | ||
p_strPath | string | The path to which to write the given text. |
p_strData | string | The text to write to the file. |
리턴 | void |
public static void WriteAllText(string p_strPath, string p_strData)
{
string strDirectory = Path.GetDirectoryName(p_strPath);
if (!Directory.Exists(strDirectory))
Directory.CreateDirectory(strDirectory);
File.WriteAllText(p_strPath, p_strData);
}