fix: improve doc link navigation and tree display

- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
This commit is contained in:
2026-03-19 12:44:08 +08:00
parent e003fe6513
commit 58a83f445a
1012 changed files with 56880 additions and 22 deletions

View File

@@ -0,0 +1,45 @@
# FileWriter::Flush
```cpp
bool Flush();
```
刷新缓冲区。
**描述**
将缓冲区中的数据强制写入磁盘,确保数据持久化。在写入大量数据后应调用此方法以确保数据已保存。
**返回:** `bool` - 是否刷新成功
**复杂度:** O(1)
**示例:**
```cpp
#include <XCEngine/Core/FileWriter.h>
#include <string>
using namespace XCEngine::Core;
FileWriter writer("output.txt");
if (writer.IsOpen()) {
// 写入大量数据
for (int i = 0; i < 1000; i++) {
writer.Write("Line ");
writer.Write(std::to_string(i).c_str());
writer.Write("\n");
}
// 刷新确保数据写入磁盘
writer.Flush();
// 数据已安全保存
writer.Close();
}
```
## 相关文档
- [FileWriter 总览](filewriter.md) - 返回类总览
- [Write](Write.md) - 写入数据