From d315b0fb8aa03ee6ecc7d93d884b606dc19c6ad5 Mon Sep 17 00:00:00 2001 From: Daniele Giuliani Date: Wed, 16 May 2018 00:50:57 +0200 Subject: added get_creation_time function for gdscript --- core/bind/core_bind.cpp | 8 ++++++++ core/bind/core_bind.h | 1 + 2 files changed, 9 insertions(+) (limited to 'core/bind') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 3270b33f1c..fa0921ae95 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1855,6 +1855,12 @@ uint64_t _File::get_modified_time(const String &p_file) const { return FileAccess::get_modified_time(p_file); } +// NEW FUNCTION +uint64_t _File::get_creation_time(const String &p_file) const { + + return FileAccess::get_creation_time(p_file); +} + void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("open_encrypted", "path", "mode_flags", "key"), &_File::open_encrypted); @@ -1906,6 +1912,7 @@ void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("file_exists", "path"), &_File::file_exists); ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &_File::get_modified_time); + ClassDB::bind_method(D_METHOD("get_creation_time", "file"), &_File::get_creation_time); // NEW FUNCTION ADD_PROPERTY(PropertyInfo(Variant::BOOL, "endian_swap"), "set_endian_swap", "get_endian_swap"); @@ -2106,6 +2113,7 @@ void _Directory::_bind_methods() { ClassDB::bind_method(D_METHOD("file_exists", "path"), &_Directory::file_exists); ClassDB::bind_method(D_METHOD("dir_exists", "path"), &_Directory::dir_exists); //ClassDB::bind_method(D_METHOD("get_modified_time","file"),&_Directory::get_modified_time); + //ClassDB::bind_method(D_METHOD("get_creation_time","file"),&_Directory::get_creation_time); // NEW FUNCTION ClassDB::bind_method(D_METHOD("get_space_left"), &_Directory::get_space_left); ClassDB::bind_method(D_METHOD("copy", "from", "to"), &_Directory::copy); ClassDB::bind_method(D_METHOD("rename", "from", "to"), &_Directory::rename); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index a363f5970f..4bf4fd9146 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -481,6 +481,7 @@ 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; + uint64_t get_creation_time(const String &p_file) const; // NEW FUNCTION _File(); virtual ~_File(); -- cgit v1.2.3