Sitecore 5.0 API

MainUtil.WriteToFile Method (String, String, Boolean)

NOTE: This method is now obsolete.

Use FileUtil.WriteToFile instead.


Write or appends a atring to a file.

[Visual Basic]
Overloads Public Shared Sub WriteToFile( _
   ByVal path As String, _
   ByVal text As String, _
   ByVal append As Boolean _
)
[C#]
public static void WriteToFile(
   string path,
   string text,
   bool append
);

Parameters

path
A file name path.
text
A string.
append
Indicates if the string is appended to the file.

Example

  MainUtil.WriteToString("/my.txt", "Hello world", true);

See Also

MainUtil Class | Sitecore Namespace | MainUtil.WriteToFile Overload List