diff options
| author | reduz | 2014-06-11 01:19:39 -0300 |
|---|---|---|
| committer | reduz | 2014-06-11 01:19:39 -0300 |
| commit | bb0dd1c5f9c1219eb5d4880f5521943f66b8d03f (patch) | |
| tree | d7bd13bad144c41f2e8bb448d5d233b46402738b /core/bind/core_bind.cpp | |
| parent | 2bf34875debd1b60809d22cf61a300b56cdfe084 (diff) | |
| parent | e6c1689b69e9e0ec530902b550c9e1e2d1cd0aae (diff) | |
| download | godot-bb0dd1c5f9c1219eb5d4880f5521943f66b8d03f.tar.gz godot-bb0dd1c5f9c1219eb5d4880f5521943f66b8d03f.tar.zst godot-bb0dd1c5f9c1219eb5d4880f5521943f66b8d03f.zip | |
Merge pull request #459 from marynate/PR-diracccess-dir-exists
Add DirAccess:dir_exist api
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 960cdbac2..73b8c01ee 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1347,6 +1347,10 @@ bool _Directory::file_exists(String p_file){ return d->file_exists(p_file); } +bool _Directory::dir_exists(String p_dir) { + ERR_FAIL_COND_V(!d,false); + return d->dir_exists(p_dir); +} int _Directory::get_space_left(){ @@ -1386,6 +1390,7 @@ void _Directory::_bind_methods() { ObjectTypeDB::bind_method(_MD("make_dir:Error","name"),&_Directory::make_dir); ObjectTypeDB::bind_method(_MD("make_dir_recursive:Error","name"),&_Directory::make_dir_recursive); ObjectTypeDB::bind_method(_MD("file_exists","name"),&_Directory::file_exists); + ObjectTypeDB::bind_method(_MD("dir_exists","name"),&_Directory::dir_exists); // ObjectTypeDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time); ObjectTypeDB::bind_method(_MD("get_space_left"),&_Directory::get_space_left); ObjectTypeDB::bind_method(_MD("copy:Error","from","to"),&_Directory::copy); |
