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

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

Issue 1156993003: Fix argument processing for RandomAccessFile.writeFrom (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments Created 5 years, 7 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 | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file.dart
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index df35660e9c2830dcef5b15c1ca3e1ff94b32d3e2..879915825fa507d261a10656f3b34eb4de933694 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -573,7 +573,7 @@ abstract class RandomAccessFile {
*
* Returns a [:Future<int>:] that completes with the number of bytes read.
*/
- Future<int> readInto(List<int> buffer, [int start, int end]);
+ Future<int> readInto(List<int> buffer, [int start = 0, int end]);
/**
* Synchronously reads into an existing List<int> from the file. If [start] is
@@ -584,7 +584,7 @@ abstract class RandomAccessFile {
*
* Throws a [FileSystemException] if the operation fails.
*/
- int readIntoSync(List<int> buffer, [int start, int end]);
+ int readIntoSync(List<int> buffer, [int start = 0, int end]);
/**
* Writes a single byte to the file. Returns a
@@ -609,7 +609,8 @@ abstract class RandomAccessFile {
* Returns a [:Future<RandomAccessFile>:] that completes with this
* [RandomAccessFile] when the write completes.
*/
- Future<RandomAccessFile> writeFrom(List<int> buffer, [int start, int end]);
+ Future<RandomAccessFile> writeFrom(
+ List<int> buffer, [int start = 0, int end]);
/**
* Synchronously writes from a [List<int>] to the file. It will read the
@@ -619,7 +620,7 @@ abstract class RandomAccessFile {
*
* Throws a [FileSystemException] if the operation fails.
*/
- void writeFromSync(List<int> buffer, [int start, int end]);
+ void writeFromSync(List<int> buffer, [int start = 0, int end]);
/**
* Writes a string to the file using the given [Encoding]. Returns a
« no previous file with comments | « no previous file | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698