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

Unified Diff: webrtc/base/file.h

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 | « no previous file | webrtc/base/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/file.h
diff --git a/webrtc/base/file.h b/webrtc/base/file.h
index 3401c28abe5e96be580f3981e3e6730257716d46..6ca4825ed006dd9e72bd689bb907198b129901d6 100644
--- a/webrtc/base/file.h
+++ b/webrtc/base/file.h
@@ -35,7 +35,10 @@ class File {
File(File&& other);
File& operator=(File&& other);
+ // Open and Create give files with both reading and writing enabled.
static File Open(const std::string& path);
+ // If the file already exists it will be overwritten.
+ static File Create(const std::string& path);
size_t Write(const uint8_t* data, size_t length);
size_t Read(uint8_t* buffer, size_t length);
« no previous file with comments | « no previous file | webrtc/base/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698