aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Haas2017-01-23 22:33:02 +0100
committerRémi Verschelde2017-03-18 19:46:36 +0100
commit8015ab0db39c4e89a2f956af217e4195a67804e9 (patch)
tree45d0e5273c93e3f78867cf47fad68e2c2407f24e
parentca3881ccb87743ac8014cf56d110520dccca12ba (diff)
downloadgodot-8015ab0db39c4e89a2f956af217e4195a67804e9.tar.gz
godot-8015ab0db39c4e89a2f956af217e4195a67804e9.tar.zst
godot-8015ab0db39c4e89a2f956af217e4195a67804e9.zip
Add ClassDB binding for File.get_modified_time
Closes #7613 (cherry picked from commit 5ec0610c606f529b21ffc13596ae5a57ead368cb)
-rw-r--r--core/bind/core_bind.cpp6
-rw-r--r--core/bind/core_bind.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index f83d593c1..41529252d 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1822,6 +1822,11 @@ Variant _File::get_var() const {
return v;
}
+uint64_t _File::get_modified_time(const String &p_file) const {
+
+ return FileAccess::get_modified_time(p_file);
+}
+
void _File::_bind_methods() {
@@ -1870,6 +1875,7 @@ void _File::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_pascal_string"),&_File::get_pascal_string);
ObjectTypeDB::bind_method(_MD("file_exists","path"),&_File::file_exists);
+ ObjectTypeDB::bind_method(_MD("get_modified_time", "file"),&_File::get_modified_time);
BIND_CONSTANT( READ );
BIND_CONSTANT( WRITE );
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index ce9a63912..2d42c99eb 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -459,6 +459,8 @@ public:
bool file_exists(const String& p_name) const; ///< return true if a file exists
+ uint64_t get_modified_time(const String& p_file) const;
+
_File();
virtual ~_File();