summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bind/core_bind.cpp10
-rw-r--r--core/bind/core_bind.h1
-rw-r--r--doc/base/classes.xml28
3 files changed, 38 insertions, 1 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);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 4a9bb2a961..7a08147dc6 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -367,6 +367,7 @@ public:
DVector<uint8_t> get_buffer(int p_length) const; ///< get an array of bytes
String get_line() const;
String get_as_text() const;
+ String get_md5(const String& p_path) const;
/**< use this for files WRITTEN in _big_ endian machines (ie, amiga/mac)
* It's not about the current CPU type but file formats.
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 9f12c7cb52..e661edf558 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<doc version="2.0.rc1.custom_build" name="Engine Types">
+<doc version="2.0.stable.custom_build" name="Engine Types">
<class name="@GDScript" category="Core">
<brief_description>
Built-in GDScript functions.
@@ -10691,6 +10691,16 @@ Returns an empty String "" at the end of the list.
<description>
</description>
</method>
+ <method name="get_md5" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Returns on success, a md5 String representing the file of the given path.
+ else, empty String "".
+ </description>
+ </method>
<method name="get_endian_swap">
<return type="bool">
</return>
@@ -29909,6 +29919,22 @@ This method controls whether the position between two cached points is interpola
<description>
</description>
</method>
+ <method name="is_node_instance_placeholder" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_node_instance_placeholder" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_node_instance" qualifiers="const">
<return type="PackedScene">
</return>