protected CreateWebsiteFile ( string filePath, string contents ) : void | ||
filePath | string | |
contents | string | |
Результат | void |
protected void CreateWebsiteFile(string filePath, string contents)
{
string fullPath = Path.Combine(_websitePath, filePath);
Directory.CreateDirectory(Path.GetDirectoryName(fullPath));
using (StreamWriter writer = File.CreateText(fullPath))
{
writer.Write(contents);
}
}