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

Unified Diff: utils/pub/io.dart

Issue 12609004: Change all File APIs to make the mode and encoding arguments named (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments and changed other use places Created 7 years, 9 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 | « utils/lib/file_system_vm.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 3f54fcdd915cac4bc05e4dafd5d77f119ff3c5b8..51c3f1314ac5cbdab8fa4162331bf879fda9f28c 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -39,7 +39,7 @@ bool fileExists(String file) =>
/// Reads the contents of the text file [file].
String readTextFile(String file) =>
- new File(file).readAsStringSync(Encoding.UTF_8);
+ new File(file).readAsStringSync(encoding: Encoding.UTF_8);
/// Reads the contents of the binary file [file].
List<int> readBinaryFile(String file) {
@@ -71,7 +71,7 @@ void deleteFile(String file) {
/// Creates [file] and writes [contents] to it.
String writeBinaryFile(String file, List<int> contents) {
log.io("Writing ${contents.length} bytes to binary file $file.");
- new File(file).openSync(FileMode.WRITE)
+ new File(file).openSync(mode: FileMode.WRITE)
..writeListSync(contents, 0, contents.length)
..closeSync();
log.fine("Wrote text file $file.");
« no previous file with comments | « utils/lib/file_system_vm.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698