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

Unified Diff: webrtc/base/file.cc

Issue 2347473003: Removing, opening and creating files in platform_file and file (Closed)
Patch Set: Comments Created 4 years, 3 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/base/file.h ('k') | webrtc/base/file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/file.cc
diff --git a/webrtc/base/file.cc b/webrtc/base/file.cc
index 9a865884ea07ca6f956c36318193ecb4bfa9293d..c97504f9c737a438c1b2bd585e58bddb087810ed 100644
--- a/webrtc/base/file.cc
+++ b/webrtc/base/file.cc
@@ -18,6 +18,14 @@ File::~File() {
Close();
}
+File File::Open(const std::string& path) {
+ return File(OpenPlatformFile(path));
+}
+
+File File::Create(const std::string& path) {
+ return File(CreatePlatformFile(path));
+}
+
File::File(File&& other) : file_(other.file_) {
other.file_ = kInvalidPlatformFileValue;
}
« no previous file with comments | « webrtc/base/file.h ('k') | webrtc/base/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698