diff options
author | Alexander Holland <alexander.holland@live.de> | 2016-02-25 19:25:29 +0100 |
---|---|---|
committer | Alexander Holland <alexander.holland@live.de> | 2016-02-25 19:25:29 +0100 |
commit | d093f558ab3b33766cc346d9964f59a6ba09ed58 (patch) | |
tree | 2d65fb310ef34099dd7d33416a31c7f715bb98b2 /core/bind/core_bind.cpp | |
parent | 32e1a56cd3b016d6834fdd0734da0e2b8fbb5c6c (diff) | |
download | redot-engine-d093f558ab3b33766cc346d9964f59a6ba09ed58.tar.gz |
expose md5 for file(s) to gdscript
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r-- | core/bind/core_bind.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 229640ba11..cbeb58b411 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1319,6 +1319,15 @@ String _File::get_as_text() const { } + + +String _File::get_md5(const String& p_path) const { + + return FileAccess::get_md5(p_path); + +} + + String _File::get_line() const{ ERR_FAIL_COND_V(!f,String()); @@ -1507,6 +1516,7 @@ void _File::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_buffer","len"),&_File::get_buffer); ObjectTypeDB::bind_method(_MD("get_line"),&_File::get_line); ObjectTypeDB::bind_method(_MD("get_as_text"),&_File::get_as_text); + ObjectTypeDB::bind_method(_MD("get_md5","path"),&_File::get_md5); ObjectTypeDB::bind_method(_MD("get_endian_swap"),&_File::get_endian_swap); ObjectTypeDB::bind_method(_MD("set_endian_swap","enable"),&_File::set_endian_swap); ObjectTypeDB::bind_method(_MD("get_error:Error"),&_File::get_error); |