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

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

Issue 15547003: Add 'start' and 'end' optional arguments to File.openRead(). This makes it possible to stream a sub… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: aFix comments. Created 7 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 20110af9ec064796cabd265f41b49323b484cf0d..eb3dcd7c8e6f25744b558646e9b0ff1adde0e443 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -180,14 +180,19 @@ abstract class File extends FileSystemEntity {
String fullPathSync();
/**
- * Create a new independent [Stream](../dart_async/Stream.html) for the
- * contents of this file.
+ * Create a new independent [Stream] for the contents of this file.
+ *
+ * If [start] is present, the file will be read from byte-offset [start].
+ * Otherwise from the beginning (index 0).
+ *
+ * If [end] is present, only up to byte-index [end] will be read. Otherwise,
+ * until end of file.
*
* In order to make sure that system resources are freed, the stream
* must be read to completion or the subscription on the stream must
* be cancelled.
*/
- Stream<List<int>> openRead();
+ Stream<List<int>> openRead([int start, int end]);
/**
* Creates a new independent [IOSink] for the file. The
« 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