SubSonic.Extensions.CreateToFile
SubSonic.Extensions.CreateToFile
Summary== Creates or opens a file for writing and writes text to it. ==Namespace
Example=="Lorem Ipsem My Test to Save".CreateToFile(@"C:\MyFile.txt"); ==Unit Test
public void CreateToFileShouldSaveTextToFile() { //sorry for this test "this is a stupid test".CreateToFile("C:\testfile2.txt"); //it's the only way I can think of to do it Assert.Equal("C:\testfile2.txt".GetFileText(), "this is a stupid test"); }
Comments
SubSonic 3.0 implements this as an extension on System.String - 2.x uses a static method on SubSonic.Sugar.Files.