Index: webrtc/test/testsupport/fileutils.cc |
diff --git a/webrtc/test/testsupport/fileutils.cc b/webrtc/test/testsupport/fileutils.cc |
index 2555f5cc07102e4bd1305e1e2adb73719b96fc67..899bf31f9070ac5c5a9166655ca3a164c461e110 100644 |
--- a/webrtc/test/testsupport/fileutils.cc |
+++ b/webrtc/test/testsupport/fileutils.cc |
@@ -106,6 +106,12 @@ bool FileExists(const std::string& file_name) { |
return stat(file_name.c_str(), &file_info) == 0; |
} |
+bool DirExists(const std::string& directory_name) { |
+ struct stat directory_info = {0}; |
+ return stat(directory_name.c_str(), &directory_info) == 0 && S_ISDIR( |
+ directory_info.st_mode); |
+} |
+ |
#ifdef WEBRTC_ANDROID |
std::string ProjectRootPath() { |