Skip to content

Commit

Permalink
Fixed per IRC chat with Anne v. K.
Browse files Browse the repository at this point in the history
  • Loading branch information
arangana committed Nov 24, 2014
1 parent f59ba50 commit 613b4d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Overview.html
Expand Up @@ -23,7 +23,7 @@
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" type="text/css" /></head>

<body>
<div class="head"><div><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></div><h1>File API</h1><h2>Editor's Draft <em>19 November 2014</em></h2><dl><dt>This Version:</dt><dd><a href="http://dev.w3.org/2006/webapi/FileAPI/">http://dev.w3.org/2006/webapi/FileAPI/</a></dd><dt>Latest Published Version:</dt><dd><a href="http://www.w3.org/TR/FileAPI/">http://www.w3.org/TR/FileAPI/</a></dd><dt>Latest Editor’s Draft:</dt><dd><a href="http://dev.w3.org/2006/webapi/FileAPI/">http://dev.w3.org/2006/webapi/FileAPI/</a></dd><dt>Previous Version(s):</dt><dd><a href="http://www.w3.org/TR/2012/WD-FileAPI-20121025/">http://www.w3.org/TR/2012/WD-FileAPI-20121025/</a></dd><dt>Editors:</dt><dd><a href="http://arunranga.com/">Arun Ranganathan</a>, Mozilla Corporation &lt;arun@mozilla.com&gt;</dd><dd>Jonas Sicking, Mozilla Corporation &lt;jonas@sicking.cc&gt;</dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:public-webapps@w3.org?subject=%5BFileAPI%5D">public-webapps@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/public-webapps/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WebAppsWG&amp;component=File%20API">file a bug</a>
<div class="head"><div><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></div><h1>File API</h1><h2>Editor's Draft <em>24 November 2014</em></h2><dl><dt>This Version:</dt><dd><a href="http://dev.w3.org/2006/webapi/FileAPI/">http://dev.w3.org/2006/webapi/FileAPI/</a></dd><dt>Latest Published Version:</dt><dd><a href="http://www.w3.org/TR/FileAPI/">http://www.w3.org/TR/FileAPI/</a></dd><dt>Latest Editor’s Draft:</dt><dd><a href="http://dev.w3.org/2006/webapi/FileAPI/">http://dev.w3.org/2006/webapi/FileAPI/</a></dd><dt>Previous Version(s):</dt><dd><a href="http://www.w3.org/TR/2012/WD-FileAPI-20121025/">http://www.w3.org/TR/2012/WD-FileAPI-20121025/</a></dd><dt>Editors:</dt><dd><a href="http://arunranga.com/">Arun Ranganathan</a>, Mozilla Corporation &lt;arun@mozilla.com&gt;</dd><dd>Jonas Sicking, Mozilla Corporation &lt;jonas@sicking.cc&gt;</dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:public-webapps@w3.org?subject=%5BFileAPI%5D">public-webapps@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/public-webapps/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WebAppsWG&amp;component=File%20API">file a bug</a>
(see <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=WebAppsWG&amp;component=File%20API&amp;resolution=---">existing bugs</a>).</p></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 2014 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr />

<div class="section">
Expand Down Expand Up @@ -73,7 +73,7 @@ <h2>Status of this Document</h2>
report can be found in the <a href="http://www.w3.org/TR/">W3C technical
reports index</a> at http://www.w3.org/TR/.
</em></p><p>
This document is the 19 November 2014 <b>Editor's Draft</b> of the
This document is the 24 November 2014 <b>Editor's Draft</b> of the
<cite>File API</cite> specification.

Please send comments about this document to
Expand Down Expand Up @@ -870,28 +870,28 @@ <h3>8.1 The Read Operation</h3>
<p>To perform a <dfn id="readOperation">read operation</dfn> on a <a href="#dfn-Blob"><code>Blob</code></a> and the <a href="#synchronousFlag">synchronous flag</a>, run the following steps:</p>
<ol>

<li><p>Let <var>s</var> be a a new <a href="#dfn-body">body</a>, <var>b</var> be the <a href="#dfn-Blob"><code>Blob</code></a> to be read from, and <var>bytes</var> initially set to an empty byte sequence. While there are still bytes to be read in <var>b</var> perform the following substeps:</p>
<li><p>Let <var>s</var> be a a new <a href="#dfn-body">body</a>, <var>b</var> be the <a href="#dfn-Blob"><code>Blob</code></a> to be read from, and <var>bytes</var> initially set to an empty byte sequence. Set the <var>length</var> on <var>s</var> to the <a href="#dfn-size"><code>size</code></a> of <var>b</var>. While there are still bytes to be read in <var>b</var> perform the following substeps:</p>

<div class="note"><div class="noteHeader">Note</div><p>The algorithm assumes that invoking methods have checked for <a href="#readabilityState">readability state</a>. A <a href="#dfn-Blob"><code>Blob</code></a> in the <a href="#dfn-closedState"><code>CLOSED</code></a> state must not have a <a href="#readOperation">read operation</a> called on it.</p></div>
<ol>

<li><p>If the <a href="#synchronousFlag">synchronous flag</a> is set, follow the steps below: </p>
<ol><li><p>Let <var>bytes</var> be the byte sequence that results from reading a <a href="#chunk">chunk</a> from <var>b</var>. If <a href="#file-error-read">an error occurs</a> reading a <a href="#chunk">chunk</a> from <var>b</var>, return failure along with a <a href="#failureReason">failure reason</a>, and <a href="#terminate-an-algorithm">terminate this algorithm</a>. </p>
<ol><li><p>Let <var>bytes</var> be the byte sequence that results from reading a <a href="#chunk">chunk</a> from <var>b</var>. If <a href="#file-error-read">an error occurs</a> reading a <a href="#chunk">chunk</a> from <var>b</var>, return <var>s</var> with the error flag set, along with a <a href="#failureReason">failure reason</a>, and <a href="#terminate-an-algorithm">terminate this algorithm</a>. </p>
<div class="note"><div class="noteHeader">Note</div>
<p>Along with returning failure, the synchronous part of this algorithm must return the <a href="#failureReason">failure reason</a> that occurred for <a href="#throw-an-exception">throwing an exception</a> by synchronous methods that invoke this algorithm with the <a href="#synchronousFlag">synchronous flag</a> set. </p>
</div>
</li>
<li><p>If there are no errors, push <var>bytes</var> to <var>s</var>, and increment <var>s</var>'s <var>length</var> [<a href="#Fetch">Fetch</a>] by the number of bytes in <var>bytes</var>. Reset <var>bytes</var> to the empty byte sequence and continue reading <a href="#chunk">chunk</a>s as above.</p></li>
<li><p>If there are no errors, push <var>bytes</var> to <var>s</var>, and increment <var>s</var>'s <var>transmitted</var> [<a href="#Fetch">Fetch</a>] by the number of bytes in <var>bytes</var>. Reset <var>bytes</var> to the empty byte sequence and continue reading <a href="#chunk">chunk</a>s as above.</p></li>
<li><p>When all the bytes of <var>b</var> have been read into <var>s</var>, return <var>s</var> and <a href="#terminate-an-algorithm">terminate this algorithm</a>.</p></li>
</ol>

</li>
<li><p>Otherwise, the <a href="#synchronousFlag">synchronous flag</a> is unset. Return <var>s</var> and process the rest of this algorithm asynchronously.</p></li>
<li><p>Let <var>bytes</var> be the byte sequence that results from reading a <a href="#chunk">chunk</a> from <var>b</var>. If <a href="#file-error-read">an error occurs</a> reading a <a href="#chunk">chunk</a> from <var>b</var>, <a href="#terminate-an-algorithm">terminate this algorithm</a> with a <a href="#failureReason">failure reason</a>.</p>
<li><p>Let <var>bytes</var> be the byte sequence that results from reading a <a href="#chunk">chunk</a> from <var>b</var>. If <a href="#file-error-read">an error occurs</a> reading a <a href="#chunk">chunk</a> from <var>b</var>, set the error flag on <var>s</var>, and <a href="#terminate-an-algorithm">terminate this algorithm</a> with a <a href="#failureReason">failure reason</a>.</p>
<div class="note"><div class="noteHeader">Note</div>
<p>The asynchronous part of this algorithm must signal the <a href="#failureReason">failure reason</a> that occurred for asynchronous error reporting by methods expecting <var>s</var> and which invoke this algorithm with the <a href="#synchronousFlag">synchronous flag</a> unset. </p>
</div></li>
<li><p>If no <a href="#file-error-read">error</a> occurs, push <var>bytes</var> to <var>s</var>, and increment <var>s</var>'s <var>length</var> [<a href="Fetch">Fetch</a>] by the number of bytes in <var>bytes</var>. Reset <var>bytes</var> to the empty byte sequence and continue reading <a href="#chunk">chunk</a>s as above. </p></li>
<li><p>If no <a href="#file-error-read">error</a> occurs, push <var>bytes</var> to <var>s</var>, and increment <var>s</var>'s <var>transmitted</var> [<a href="Fetch">Fetch</a>] by the number of bytes in <var>bytes</var>. Reset <var>bytes</var> to the empty byte sequence and continue reading <a href="#chunk">chunk</a>s as above. </p></li>

</ol>

Expand Down

0 comments on commit 613b4d5

Please sign in to comment.