Index: ppapi/api/ppb_file_io.idl |
diff --git a/ppapi/api/ppb_file_io.idl b/ppapi/api/ppb_file_io.idl |
index 0d2c845bfd2a10c8c91784782f2d8ef32ba88099..d595bdc6a97b81787d9bb1ea4dec7c5b11aade68 100644 |
--- a/ppapi/api/ppb_file_io.idl |
+++ b/ppapi/api/ppb_file_io.idl |
@@ -99,8 +99,9 @@ interface PPB_FileIO { |
[in] PP_CompletionCallback callback); |
/** |
- * Query() queries info about the file opened by this FileIO object. This |
- * function will fail if the FileIO object has not been opened. |
+ * Query() queries info about the file opened by this FileIO object. The |
+ * FileIO object must be opened, and there must be no other operations |
+ * pending. |
* |
* @param[in] file_io A <code>PP_Resource</code> corresponding to a |
* FileIO. |
@@ -110,6 +111,8 @@ interface PPB_FileIO { |
* completion of Query(). |
* |
* @return An int32_t containing an error code from <code>pp_errors.h</code>. |
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and |
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending. |
*/ |
int32_t Query([in] PP_Resource file_io, |
[out] PP_FileInfo info, |
@@ -117,7 +120,9 @@ interface PPB_FileIO { |
/** |
* Touch() Updates time stamps for the file opened by this FileIO object. |
- * This function will fail if the FileIO object has not been opened. |
+ * This function will fail if the FileIO object has not been opened. The |
+ * FileIO object must be opened, and there must be no other operations |
+ * pending. |
* |
* @param[in] file_io A <code>PP_Resource</code> corresponding to a file |
* FileIO. |
@@ -127,6 +132,8 @@ interface PPB_FileIO { |
* completion of Touch(). |
* |
* @return An int32_t containing an error code from <code>pp_errors.h</code>. |
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and |
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending. |
*/ |
int32_t Touch([in] PP_Resource file_io, |
[in] PP_Time last_access_time, |
@@ -150,7 +157,8 @@ interface PPB_FileIO { |
* @return An The number of bytes read an error code from |
* <code>pp_errors.h</code>. If the return value is 0, then end-of-file was |
* reached. It is valid to call Read() multiple times with a completion |
- * callback to queue up parallel reads from the file at different offsets. |
+ * callback to queue up parallel reads from the file, but pending reads |
+ * cannot be interleaved with other operations. |
*/ |
int32_t Read([in] PP_Resource file_io, |
[in] int64_t offset, |
@@ -174,7 +182,8 @@ interface PPB_FileIO { |
* @return An The number of bytes written or an error code from |
* <code>pp_errors.h</code>. If the return value is 0, then end-of-file was |
* reached. It is valid to call Write() multiple times with a completion |
- * callback to queue up parallel writes to the file at different offsets. |
+ * callback to queue up parallel writes to the file, but pending writes |
+ * cannot be interleaved with other operations. |
*/ |
int32_t Write([in] PP_Resource file_io, |
[in] int64_t offset, |
@@ -183,8 +192,9 @@ interface PPB_FileIO { |
[in] PP_CompletionCallback callback); |
/** |
* SetLength() sets the length of the file. If the file size is extended, |
- * then the extended area of the file is zero-filled. The FileIO object must |
- * have been opened with write access. |
+ * then the extended area of the file is zero-filled. The FileIO object must |
+ * have been opened with write access and there must be no other operations |
+ * pending. |
* |
* @param[in] file_io A <code>PP_Resource</code> corresponding to a file |
* FileIO. |
@@ -193,13 +203,17 @@ interface PPB_FileIO { |
* completion of SetLength(). |
* |
* @return An int32_t containing an error code from <code>pp_errors.h</code>. |
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and |
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending. |
*/ |
int32_t SetLength([in] PP_Resource file_io, |
[in] int64_t length, |
[in] PP_CompletionCallback callback); |
/** |
- * Flush() flushes changes to disk. This call can be very expensive! |
+ * Flush() flushes changes to disk. This call can be very expensive! The |
+ * FileIO object must have been opened with write access and there must be no |
+ * other operations pending. |
* |
* @param[in] file_io A <code>PP_Resource</code> corresponding to a file |
* FileIO. |
@@ -207,6 +221,8 @@ interface PPB_FileIO { |
* completion of Flush(). |
* |
* @return An int32_t containing an error code from <code>pp_errors.h</code>. |
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and |
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending. |
*/ |
int32_t Flush([in] PP_Resource file_io, |
[in] PP_CompletionCallback callback); |