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:
43
docs/api/core/filewriter/IsOpen.md
Normal file
43
docs/api/core/filewriter/IsOpen.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# FileWriter::IsOpen
|
||||
|
||||
```cpp
|
||||
bool IsOpen() const;
|
||||
```
|
||||
|
||||
检查文件是否已打开。
|
||||
|
||||
**描述**
|
||||
|
||||
返回文件是否已成功打开并可用于写入。
|
||||
|
||||
**返回:** `bool` - 文件是否已打开
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Core/FileWriter.h>
|
||||
|
||||
using namespace XCEngine::Core;
|
||||
|
||||
FileWriter writer1;
|
||||
if (writer1.IsOpen()) {
|
||||
// 不会执行
|
||||
writer1.Write("test");
|
||||
}
|
||||
|
||||
// 打开文件
|
||||
FileWriter writer2("output.txt");
|
||||
if (writer2.IsOpen()) {
|
||||
printf("File opened successfully\n");
|
||||
writer2.Write("Content");
|
||||
} else {
|
||||
printf("Failed to open file\n");
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [FileWriter 总览](filewriter.md) - 返回类总览
|
||||
- [Open](Open.md) - 打开文件
|
||||
Reference in New Issue
Block a user