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

Side by Side Diff: lib/io.js

Issue 29481653: Issue 5378 - Stop using of jshydra in libadblockplus (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 6, 2017, 1:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 25 matching lines...) Expand all
36 for (var i = 0; i < lines.length; i++) 36 for (var i = 0; i < lines.length; i++)
37 listener.process(lines[i]); 37 listener.process(lines[i]);
38 listener.process(null); 38 listener.process(null);
39 callback(null); 39 callback(null);
40 } 40 }
41 }); 41 });
42 }, 42 },
43 43
44 writeToFile: function(file, data, callback, timeLineID) 44 writeToFile: function(file, data, callback, timeLineID)
45 { 45 {
46 var content = data.join(this.lineBreak) + this.lineBreak; 46 let content = Array.from(data).join(this.lineBreak) + this.lineBreak;
sergei 2017/07/06 13:37:01 core/filterStorage.js calls writeToFile and passes
47 _fileSystem.write(file.path, content, callback); 47 _fileSystem.write(file.path, content, callback);
48 }, 48 },
49 49
50 copyFile: function(fromFile, toFile, callback) 50 copyFile: function(fromFile, toFile, callback)
51 { 51 {
52 // Simply combine read and write operations 52 // Simply combine read and write operations
53 var data = []; 53 var data = [];
54 this.readFromFile(fromFile, { 54 this.readFromFile(fromFile, {
55 process: function(line) 55 process: function(line)
56 { 56 {
(...skipping 20 matching lines...) Expand all
77 }, 77 },
78 78
79 statFile: function(file, callback) 79 statFile: function(file, callback)
80 { 80 {
81 _fileSystem.stat(file.path, function(result) 81 _fileSystem.stat(file.path, function(result)
82 { 82 {
83 callback(result.error, result); 83 callback(result.error, result);
84 }); 84 });
85 } 85 }
86 }; 86 };
OLDNEW
« lib/compat.js ('K') | « lib/compat.js ('k') | lib/updater.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld