System::IO::File::WriteAllText 方法
File::WriteAllText method
创建新文本文件或覆盖已有文件,并使用指定的编码将指定字符串的内容写入文件。
static void System::IO::File::WriteAllText(const String &path, const String &contents, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked())
| 参数 | 类型 | 描述 |
|---|---|---|
| 路径 | const String& | 要创建或覆盖的文件 |
| 内容 | const String& | 字符串数组 |
| encoding | const EncodingPtr& | 要使用的字符编码 |
另见
- Class String
- Typedef EncodingPtr
- Class File
- Namespace System::IO
- Library Aspose.Font for C++