## File::CreateText method


Creates a new or opens existing file for writing UTF-8 encoded text.

```cpp
static StreamWriterPtr System::IO::File::CreateText(const String &path)
```


| Parameter | Type | Description |
| --- | --- | --- |
| path | const String\& | The path of the file to create or open |

### ReturnValue

A shared pointer to the [StreamWriter](../../streamwriter/) object associated with the specified file

## See Also

* Typedef [StreamWriterPtr](../../../system/streamwriterptr/)
* Class [String](../../../system/string/)
* Class [File](../)
* Namespace [System::IO](../../)
* Library [Aspose.PDF for C++](../../../)
