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

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

Issue 11308226: Add RandomAccessFile.read method and use it for file input stream. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file_patch.dart ('k') | 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 7937aa0b35a70c787f0c2376aaf34c41f8129247..bef2d686e2c78950db86371da4223ce84c16462e 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -304,6 +304,17 @@ abstract class RandomAccessFile {
int readByteSync();
/**
+ * Reads from a file and returns the result as a list of bytes.
+ */
+ Future<List<int>> read(int bytes);
+
+ /**
+ * Synchronously reads from a file and returns the result in a
+ * list of bytes.
+ */
+ List<int> readSync(int bytes);
+
+ /**
* Read a List<int> from the file. Returns a [:Future<int>:] that
* completes with an indication of how much was read.
*/
« no previous file with comments | « runtime/bin/file_patch.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698