summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-23 22:07:02 -0300
committerGitHub <noreply@github.com>2017-01-23 22:07:02 -0300
commit2527566ca899e2ac9d8baa8b4e68a22bf7077f35 (patch)
tree1a139e0d69a9783cafa88ede422d91fc9e64eded
parent0ff37cff624eccb5aaaea5172e0946d45d2ee62f (diff)
parent5ec0610c606f529b21ffc13596ae5a57ead368cb (diff)
Merge pull request #7621 from Hinsbart/modified_time
Add ClassDB binding for File.get_modified_time
-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 d4f61b7ffc..954ebbc30c 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1732,6 +1732,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() {
@@ -1780,6 +1785,7 @@ void _File::_bind_methods() {
ClassDB::bind_method(_MD("get_pascal_string"),&_File::get_pascal_string);
ClassDB::bind_method(_MD("file_exists","path"),&_File::file_exists);
+ ClassDB::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 f10714720f..fe710704f2 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -440,6 +440,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();