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

Unified Diff: runtime/bin/file.h

Issue 1193653002: Add file modes for opening a file write only (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments + fixed analyzer reported issues Created 5 years, 6 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 | runtime/bin/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.h
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index 7a8107fd91f4f16629aec759ee9ba50e46aa1281..633c006175fa77f3f081815644e2b4b85f2a5b3e 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -26,15 +26,20 @@ class File {
kRead = 0,
kWrite = 1,
kTruncate = 1 << 2,
- kWriteTruncate = kWrite | kTruncate
+ kWriteOnly = 1 << 3,
+ kWriteTruncate = kWrite | kTruncate,
+ kWriteOnlyTruncate = kWriteOnly | kTruncate
};
// These values have to be kept in sync with the mode values of
- // FileMode.READ, FileMode.WRITE and FileMode.APPEND in file.dart.
+ // FileMode.READ, FileMode.WRITE, FileMode.APPEND,
+ // FileMode.WRITE_ONLY and FileMode.WRITE_ONLY_APPEND in file.dart.
enum DartFileOpenMode {
kDartRead = 0,
kDartWrite = 1,
- kDartAppend = 2
+ kDartAppend = 2,
+ kDartWriteOnly = 3,
+ kDartWriteOnlyAppend = 4
};
enum Type {
« no previous file with comments | « no previous file | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698