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

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

Issue 2898753002: ReadDirectory() added in webrtc/test/testsupport/fileutils.h (Closed)
Patch Set: final changes and win trybot fix gtest Created 3 years, 7 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 | « no previous file | webrtc/test/testsupport/fileutils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/fileutils.h
diff --git a/webrtc/test/testsupport/fileutils.h b/webrtc/test/testsupport/fileutils.h
index 2135681380c0fed1cd4510c640e20a9b9cf03f63..434287d6d94ab598f6582965f5640209320112f5 100644
--- a/webrtc/test/testsupport/fileutils.h
+++ b/webrtc/test/testsupport/fileutils.h
@@ -14,6 +14,9 @@
#define WEBRTC_TEST_TESTSUPPORT_FILEUTILS_H_
#include <string>
+#include <vector>
+
+#include "webrtc/base/optional.h"
namespace webrtc {
namespace test {
@@ -66,6 +69,12 @@ std::string ResourcePath(const std::string& name,
// directory.
std::string WorkingDir();
+// Reads the content of a directory and, in case of success, returns a vector
+// of strings with one element for each found file or directory. Each element is
+// a path created by prepending |dir| to the file/directory name. "." and ".."
+// are never added in the returned vector.
+rtc::Optional<std::vector<std::string>> ReadDirectory(std::string path);
+
// Creates a directory if it not already exists.
// Returns true if successful. Will print an error message to stderr and return
// false if a file with the same name already exists.
« no previous file with comments | « no previous file | webrtc/test/testsupport/fileutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698