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

Unified Diff: sdk/lib/io/file_impl.dart

Issue 11663004: Fix File.writeAsString to use named optional arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « sdk/lib/io/file.dart ('k') | tests/standalone/io/file_write_as_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file_impl.dart
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index 98519c17a9b8f0132b70000e171ccedb7c3be96d..1f6f0818bb095678e59e72f64eaefa30dc85e440 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -683,8 +683,8 @@ class _File extends _FileBase implements File {
}
Future<File> writeAsString(String contents,
- [FileMode mode = FileMode.WRITE,
- Encoding encoding = Encoding.UTF_8]) {
+ {FileMode mode: FileMode.WRITE,
+ Encoding encoding: Encoding.UTF_8}) {
try {
var data = _StringEncoders.encoder(encoding).encodeString(contents);
return writeAsBytes(data, mode);
@@ -696,8 +696,8 @@ class _File extends _FileBase implements File {
}
void writeAsStringSync(String contents,
- [FileMode mode = FileMode.WRITE,
- Encoding encoding = Encoding.UTF_8]) {
+ {FileMode mode: FileMode.WRITE,
+ Encoding encoding: Encoding.UTF_8}) {
var data = _StringEncoders.encoder(encoding).encodeString(contents);
writeAsBytesSync(data, mode);
}
« no previous file with comments | « sdk/lib/io/file.dart ('k') | tests/standalone/io/file_write_as_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698