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

Side by Side Diff: sdk/lib/io/file.dart

Issue 11412033: Rename File.readAsText to File.readAsString. There is no Text type in Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « samples/buildhook2/build.dart ('k') | sdk/lib/io/file_impl.dart » ('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 5
6 /** 6 /**
7 * FileMode describes the modes in which a file can be opened. 7 * FileMode describes the modes in which a file can be opened.
8 */ 8 */
9 class FileMode { 9 class FileMode {
10 static const READ = const FileMode._internal(0); 10 static const READ = const FileMode._internal(0);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 * is the contents of the file. 177 * is the contents of the file.
178 */ 178 */
179 Future<List<int>> readAsBytes(); 179 Future<List<int>> readAsBytes();
180 180
181 /** 181 /**
182 * Synchronously read the entire file contents as a list of bytes. 182 * Synchronously read the entire file contents as a list of bytes.
183 */ 183 */
184 List<int> readAsBytesSync(); 184 List<int> readAsBytesSync();
185 185
186 /** 186 /**
187 * Read the entire file contents as text using the given 187 * Read the entire file contents as a string using the given
188 * [encoding]. 188 * [encoding].
189 * 189 *
190 * Returns a [:Future<String>:] that completes with the string once 190 * Returns a [:Future<String>:] that completes with the string once
191 * the file contents has been read. 191 * the file contents has been read.
192 */ 192 */
193 Future<String> readAsText([Encoding encoding = Encoding.UTF_8]); 193 Future<String> readAsString([Encoding encoding = Encoding.UTF_8]);
194 194
195 /** 195 /**
196 * Synchronously read the entire file contents as text using the 196 * Synchronously read the entire file contents as a string using the
197 * given [encoding]. 197 * given [encoding].
198 */ 198 */
199 String readAsTextSync([Encoding encoding = Encoding.UTF_8]); 199 String readAsStringSync([Encoding encoding = Encoding.UTF_8]);
200 200
201 /** 201 /**
202 * Read the entire file contents as lines of text using the give 202 * Read the entire file contents as lines of text using the give
203 * [encoding]. 203 * [encoding].
204 * 204 *
205 * Returns a [:Future<List<String>>:] that completes with the lines 205 * Returns a [:Future<List<String>>:] that completes with the lines
206 * once the file contents has been read. 206 * once the file contents has been read.
207 */ 207 */
208 Future<List<String>> readAsLines([Encoding encoding = Encoding.UTF_8]); 208 Future<List<String>> readAsLines([Encoding encoding = Encoding.UTF_8]);
209 209
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 sb.add(" ($osError)"); 380 sb.add(" ($osError)");
381 } 381 }
382 } else if (osError != null) { 382 } else if (osError != null) {
383 sb.add(": osError"); 383 sb.add(": osError");
384 } 384 }
385 return sb.toString(); 385 return sb.toString();
386 } 386 }
387 final String message; 387 final String message;
388 final OSError osError; 388 final OSError osError;
389 } 389 }
OLDNEW
« no previous file with comments | « samples/buildhook2/build.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698