mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Merge commit godotengine/godot@2d3bdcac35
This commit is contained in:
@@ -148,7 +148,7 @@ Error DirAccess::make_dir_recursive(const String &p_dir) {
|
||||
full_dir = p_dir;
|
||||
}
|
||||
|
||||
full_dir = full_dir.replace("\\", "/");
|
||||
full_dir = full_dir.replace_char('\\', '/');
|
||||
|
||||
String base;
|
||||
|
||||
@@ -338,7 +338,7 @@ Ref<DirAccess> DirAccess::create_temp(const String &p_prefix, bool p_keep, Error
|
||||
uint32_t suffix_i = 0;
|
||||
String path;
|
||||
while (true) {
|
||||
String datetime = Time::get_singleton()->get_datetime_string_from_system().replace("-", "").replace("T", "").replace(":", "");
|
||||
String datetime = Time::get_singleton()->get_datetime_string_from_system().remove_chars("-T:");
|
||||
datetime += itos(Time::get_singleton()->get_ticks_usec());
|
||||
String suffix = datetime + (suffix_i > 0 ? itos(suffix_i) : "");
|
||||
path = (p_prefix.is_empty() ? "" : p_prefix + "-") + suffix;
|
||||
@@ -628,6 +628,10 @@ bool DirAccess::is_case_sensitive(const String &p_path) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DirAccess::is_equivalent(const String &p_path_a, const String &p_path_b) const {
|
||||
return p_path_a == p_path_b;
|
||||
}
|
||||
|
||||
void DirAccess::_bind_methods() {
|
||||
ClassDB::bind_static_method("DirAccess", D_METHOD("open", "path"), &DirAccess::_open);
|
||||
ClassDB::bind_static_method("DirAccess", D_METHOD("get_open_error"), &DirAccess::get_open_error);
|
||||
@@ -673,6 +677,7 @@ void DirAccess::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_include_hidden"), &DirAccess::get_include_hidden);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("is_case_sensitive", "path"), &DirAccess::is_case_sensitive);
|
||||
ClassDB::bind_method(D_METHOD("is_equivalent", "path_a", "path_b"), &DirAccess::is_equivalent);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "include_navigational"), "set_include_navigational", "get_include_navigational");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "include_hidden"), "set_include_hidden", "get_include_hidden");
|
||||
|
||||
Reference in New Issue
Block a user