Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/io.js

Issue 4831974724206592: Issue 192 - Clean up from #153 (Closed)
Patch Set: Created April 14, 2014, 6:56 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/filterStorage.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/io.js
===================================================================
--- a/lib/io.js
+++ b/lib/io.js
@@ -64,17 +64,17 @@ let IO = exports.IO =
return null;
},
/**
* Reads strings from a file asynchronously, calls listener.process() with
* each line read and with a null parameter once the read operation is done.
* The callback will be called when the operation is done.
*/
- readFromFile: function(/**nsIFile*/ file, /**Boolean*/ decode, /**Object*/ listener, /**Function*/ callback, /**String*/ timeLineID)
+ readFromFile: function(/**nsIFile*/ file, /**Object*/ listener, /**Function*/ callback, /**String*/ timeLineID)
{
try
{
let processing = false;
let buffer = "";
let loaded = false;
let error = null;
@@ -198,20 +198,20 @@ let IO = exports.IO =
}
catch (e)
{
callback(e);
}
},
/**
- * Writes string data to a file asynchronously, optionally encodes it into
- * UTF-8 first. The callback will be called when the write operation is done.
+ * Writes string data to a file in UTF-8 format asynchronously. The callback
+ * will be called when the write operation is done.
*/
- writeToFile: function(/**nsIFile*/ file, /**Boolean*/ encode, /**Iterator*/ data, /**Function*/ callback, /**String*/ timeLineID)
+ writeToFile: function(/**nsIFile*/ file, /**Iterator*/ data, /**Function*/ callback, /**String*/ timeLineID)
{
try
{
let encoder = new TextEncoder();
Task.spawn(function()
{
// This mimics OS.File.writeAtomic() but writes in chunks.
« no previous file with comments | « lib/filterStorage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld