feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -49,7 +49,7 @@
#define ENV_PATH_SEP ":"
#endif
namespace path {
namespace Path {
String find_executable(const String &p_name) {
#ifdef WINDOWS_ENABLED
@ -62,7 +62,7 @@ String find_executable(const String &p_name) {
}
for (int i = 0; i < env_path.size(); i++) {
String p = path::join(env_path[i], p_name);
String p = Path::join(env_path[i], p_name);
#ifdef WINDOWS_ENABLED
for (int j = 0; j < exts.size(); j++) {
@ -92,8 +92,7 @@ String cwd() {
return ".";
}
String result;
result.parse_utf16(buffer.ptr());
String result = String::utf16(buffer.ptr());
if (result.is_empty()) {
return ".";
}
@ -105,7 +104,7 @@ String cwd() {
}
String result;
if (result.parse_utf8(buffer) != OK) {
if (result.append_utf8(buffer) != OK) {
return ".";
}
@ -117,7 +116,7 @@ String abspath(const String &p_path) {
if (p_path.is_absolute_path()) {
return p_path.simplify_path();
} else {
return path::join(path::cwd(), p_path).simplify_path();
return Path::join(Path::cwd(), p_path).simplify_path();
}
}
@ -145,8 +144,7 @@ String realpath(const String &p_path) {
::CloseHandle(hFile);
String result;
result.parse_utf16(buffer.ptr());
String result = String::utf16(buffer.ptr());
if (result.is_empty()) {
return p_path;
}
@ -160,7 +158,7 @@ String realpath(const String &p_path) {
}
String result;
Error parse_ok = result.parse_utf8(resolved_path);
Error parse_ok = result.append_utf8(resolved_path);
::free(resolved_path);
if (parse_ok != OK) {
@ -186,11 +184,11 @@ String join(const String &p_a, const String &p_b) {
}
String join(const String &p_a, const String &p_b, const String &p_c) {
return path::join(path::join(p_a, p_b), p_c);
return Path::join(Path::join(p_a, p_b), p_c);
}
String join(const String &p_a, const String &p_b, const String &p_c, const String &p_d) {
return path::join(path::join(path::join(p_a, p_b), p_c), p_d);
return Path::join(Path::join(Path::join(p_a, p_b), p_c), p_d);
}
String relative_to_impl(const String &p_path, const String &p_relative_to) {
@ -263,4 +261,4 @@ String get_csharp_project_name() {
return name;
}
} // namespace path
} // namespace Path