From e6c1689b69e9e0ec530902b550c9e1e2d1cd0aae Mon Sep 17 00:00:00 2001 From: marynate Date: Sun, 25 May 2014 11:34:51 +0800 Subject: Add DirAccess:dir_exist api --- core/io/file_access_pack.cpp | 5 +++++ core/io/file_access_pack.h | 1 + 2 files changed, 6 insertions(+) (limited to 'core/io') diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 6a28fa9dae..e2cb300ebc 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -443,6 +443,11 @@ bool DirAccessPack::file_exists(String p_file){ return current->files.has(p_file); } +bool DirAccessPack::dir_exists(String p_dir) { + + return current->subdirs.has(p_dir); +} + Error DirAccessPack::make_dir(String p_dir){ return ERR_UNAVAILABLE; diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 07ce8cbaf8..a4c750bf3c 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -190,6 +190,7 @@ public: virtual bool file_exists(String p_file); + virtual bool dir_exists(String p_dir); virtual Error make_dir(String p_dir); -- cgit v1.2.3