Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: webrtc/test/testsupport/fileutils.cc

Issue 2749163003: FileUtilsTest DirExists function added (Closed)
Patch Set: OS-generic test Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/testsupport/fileutils.h ('k') | webrtc/test/testsupport/fileutils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « webrtc/test/testsupport/fileutils.h ('k') | webrtc/test/testsupport/fileutils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698