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

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

Issue 702363002: Update documentation for RandomAccessFile (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix Created 6 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 | « no previous file | no next file » | 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 979d6f607e73c7a0a2352c0dcd7a9fb589b96905..2970c93caffde3fd83c3efec5b8bcc9206311958 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -499,6 +499,18 @@ abstract class File extends FileSystemEntity {
* [RandomAccessFile] provides random access to the data in a
* file. [RandomAccessFile] objects are obtained by calling the
Lasse Reichstein Nielsen 2014/11/06 09:18:39 New paragraph after "file.". Use `RandomAccessFil
Søren Gjesse 2014/11/06 12:06:10 Removed all []'s for RandomAccessFile.
* [:open:] method on a [File] object.
+ *
+ * A [RandomAccessFile] have both asynchronous and synchronous
Lasse Reichstein Nielsen 2014/11/06 09:18:39 Swap "synchronous" and "asynchronous". (It sounds
Søren Gjesse 2014/11/06 12:06:10 We are "preferring" async over sync, so I think it
+ * methods. The asynchronous methods all return a `Future`
+ * whereas the synchronous methods will block the current isolate
Lasse Reichstein Nielsen 2014/11/06 09:18:39 ... will return the result directly, and block the
Søren Gjesse 2014/11/06 12:06:10 Done.
+ * and return the result directly.
+ *
+ * At most one asynchronous method can be pending on a given [RandomAccessFile]
+ * instance at the time. If an asynchronous method is called when one is
+ * already in progress a [FileSystemException] is thrown.
Lasse Reichstein Nielsen 2014/11/06 09:18:39 Why the restriction? It would be (much!) better to
Søren Gjesse 2014/11/06 12:06:10 If we are to allow several outstanding async opera
+ *
+ * If an asynchronous method is pending it is also not possible to call any
+ * synchronous methods. This will also throw a [FileSystemException].
Lasse Reichstein Nielsen 2014/11/06 09:18:39 Definitely need a way to see if it's safe.
Søren Gjesse 2014/11/06 12:06:10 Again most likely combining async and sync is a pr
*/
abstract class RandomAccessFile {
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698