VFile.CreateText Method
Namespace: Rebex.IO
Assembly: Rebex.FileSystem.dll (version 7.0.9119)
CreateText(String)
Method returns StreamWriter
for a file identified by the path
.
A caller must dispose the returned StreamWriter to ensure that the data
written to the StreamWriter are persisted.
Declaration
public static StreamWriter CreateText(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the file. |
Returns
Type | Description |
---|---|
StreamWriter | StreamWriter for a file identified by the |
Remarks
Method creates the file if it does not exist. When the file exists then the content of the existing file is truncated.
Returned instance of the StreamWriter uses UTF-8 character encoding.