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

Side by Side Diff: runtime/bin/file_android.cc

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 unified diff | Download patch
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_fuchsia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_ANDROID) 6 #if defined(TARGET_OS_ANDROID)
7 7
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return NO_RETRY_EXPECTED(lseek64(handle_->fd(), 0, SEEK_CUR)); 125 return NO_RETRY_EXPECTED(lseek64(handle_->fd(), 0, SEEK_CUR));
126 } 126 }
127 127
128 128
129 bool File::SetPosition(int64_t position) { 129 bool File::SetPosition(int64_t position) {
130 ASSERT(handle_->fd() >= 0); 130 ASSERT(handle_->fd() >= 0);
131 return NO_RETRY_EXPECTED(lseek64(handle_->fd(), position, SEEK_SET)) >= 0; 131 return NO_RETRY_EXPECTED(lseek64(handle_->fd(), position, SEEK_SET)) >= 0;
132 } 132 }
133 133
134 134
135 // There is no difference between binary and text translation modes on this
136 // platform, so this operation is a no-op.
137 void File::SetTranslation(DartFileTranslation translation) {}
138
139
135 bool File::Truncate(int64_t length) { 140 bool File::Truncate(int64_t length) {
136 ASSERT(handle_->fd() >= 0); 141 ASSERT(handle_->fd() >= 0);
137 return TEMP_FAILURE_RETRY(ftruncate(handle_->fd(), length) != -1); 142 return TEMP_FAILURE_RETRY(ftruncate(handle_->fd(), length) != -1);
138 } 143 }
139 144
140 145
141 bool File::Flush() { 146 bool File::Flush() {
142 ASSERT(handle_->fd() >= 0); 147 ASSERT(handle_->fd() >= 0);
143 return NO_RETRY_EXPECTED(fsync(handle_->fd()) != -1); 148 return NO_RETRY_EXPECTED(fsync(handle_->fd()) != -1);
144 } 149 }
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return ((file_1_info.st_ino == file_2_info.st_ino) && 581 return ((file_1_info.st_ino == file_2_info.st_ino) &&
577 (file_1_info.st_dev == file_2_info.st_dev)) 582 (file_1_info.st_dev == file_2_info.st_dev))
578 ? File::kIdentical 583 ? File::kIdentical
579 : File::kDifferent; 584 : File::kDifferent;
580 } 585 }
581 586
582 } // namespace bin 587 } // namespace bin
583 } // namespace dart 588 } // namespace dart
584 589
585 #endif // defined(TARGET_OS_ANDROID) 590 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698