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

Unified Diff: runtime/bin/file.h

Issue 2698813002: [dart:io][windows] Make unicode characters display correctly. (Closed)
Patch Set: Address comments Created 3 years, 10 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 ec4ca3bab51aeffebf86467fdae150b8318b944e..53e439350ded63e3402af87435d03514720a4b26 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -60,6 +60,13 @@ class File : public ReferenceCounted<File> {
kDartWriteOnlyAppend = 4
};
+ // These values have to be kept in sync with the values of
+ // _FileTranslation.text and _FileTranslation.binary in file_impl.dart
+ enum DartFileTranslation {
+ kText = 0,
+ kBinary = 1,
+ };
+
enum Type { kIsFile = 0, kIsDirectory = 1, kIsLink = 2, kDoesNotExist = 3 };
enum Identical { kIdentical = 0, kDifferent = 1, kError = 2 };
@@ -126,6 +133,10 @@ class File : public ReferenceCounted<File> {
// Set the byte position in the file.
bool SetPosition(int64_t position);
+ // Set the translation mode of the file. This is currently a no-op unless the
+ // file is for a terminal on Windows.
+ void SetTranslation(DartFileTranslation translation);
+
// Truncate (or extend) the file to the given length in bytes.
bool Truncate(int64_t length);
« 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