Merge pull request #3833 from AlexHolly/feature-file-md5

expose md5 for file(s) to gdscript
This commit is contained in:
Rémi Verschelde 2016-03-08 19:32:33 +01:00
commit 32bb7a04a2
3 changed files with 21 additions and 0 deletions

View file

@ -1325,6 +1325,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());
@ -1513,6 +1522,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);