| 1426 | const auto dir = Path::RemoveFile(src); |
| 1427 | des_path = Path::Append(dir, des); |
| 1428 | } |
| 1429 | return static_cast<bool>(MoveFileW(src.c_str(), (des_path.empty() ? des : des_path).c_str())); |
| 1430 | } |
| 1431 | }; |
| 1432 | struct QiFunc_file_remove : public QiFunc |
| 1433 | { |
| 1434 | QiFunc_file_remove() : QiFunc(1) {} |
| 1435 | QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override |
| 1436 | { |
| 1437 | return static_cast<bool>(DeleteFileW(String::toWString(args[0].toString()).c_str())); |
| 1438 | } |
| 1439 | }; |
| 1440 | struct QiFunc_file_open : public QiFunc |