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

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

Issue 2872283002: Reduce dependencies on rtc::FileSystem in FileRotatingStream tests, adding helpers in webrtc::test:: (Closed)
Patch Set: Addressed nits. 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 | « webrtc/test/testsupport/fileutils.h ('k') | no next file » | 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 899bf31f9070ac5c5a9166655ca3a164c461e110..02ef06580bbcec4203d46ac1c23f42d4e279ebd6 100644
--- a/webrtc/test/testsupport/fileutils.cc
+++ b/webrtc/test/testsupport/fileutils.cc
@@ -232,6 +232,22 @@ bool CreateDir(const std::string& directory_name) {
return true;
}
+bool RemoveDir(const std::string& directory_name) {
+#ifdef WIN32
+ return RemoveDirectoryA(directory_name.c_str()) != FALSE;
+#else
+ return rmdir(directory_name.c_str()) == 0;
+#endif
+}
+
+bool RemoveFile(const std::string& file_name) {
+#ifdef WIN32
+ return DeleteFileA(file_name.c_str()) != FALSE;
+#else
+ return unlink(file_name.c_str()) == 0;
+#endif
+}
+
std::string ResourcePath(const std::string& name,
const std::string& extension) {
#if defined(WEBRTC_IOS)
« no previous file with comments | « webrtc/test/testsupport/fileutils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698