summaryrefslogtreecommitdiffstats
path: root/core/core_bind.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-03-22 19:22:46 +0100
committerGitHub <noreply@github.com>2022-03-22 19:22:46 +0100
commit9162f27836b13744dd5bb41f3fca2855e6018adf (patch)
tree9d4d2bcfdb34d17abbe8666489698d411a2ea4cc /core/core_bind.cpp
parenta30d17fe23cab95716e4b1bff9dfac21b70b5481 (diff)
parent2f651277dac25ca8628102068929e3cf3e245904 (diff)
downloadredot-engine-9162f27836b13744dd5bb41f3fca2855e6018adf.tar.gz
Merge pull request #59314 from reduz/add-static-methods-to-classdb
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r--core/core_bind.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 2d0eaadbdf..7150459d84 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -1334,7 +1334,7 @@ void File::store_buffer(const Vector<uint8_t> &p_buffer) {
f->store_buffer(&r[0], len);
}
-bool File::file_exists(const String &p_name) const {
+bool File::file_exists(const String &p_name) {
return FileAccess::exists(p_name);
}
@@ -1424,7 +1424,7 @@ void File::_bind_methods() {
ClassDB::bind_method(D_METHOD("store_pascal_string", "string"), &File::store_pascal_string);
ClassDB::bind_method(D_METHOD("get_pascal_string"), &File::get_pascal_string);
- ClassDB::bind_method(D_METHOD("file_exists", "path"), &File::file_exists);
+ ClassDB::bind_static_method("File", D_METHOD("file_exists", "path"), &File::file_exists);
ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &File::get_modified_time);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "big_endian"), "set_big_endian", "is_big_endian");