From f2912bad9551e04e1b5193269fcd0097f50a8e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 9 Jan 2014 11:39:29 -0500 Subject: [PATCH] fileUtils: Remove listDirAsync() It's unused since commit da4238ec681c7, just kill it. https://bugzilla.gnome.org/show_bug.cgi?id=721629 --- js/misc/fileUtils.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/js/misc/fileUtils.js b/js/misc/fileUtils.js index cec06d95f..036017e67 100644 --- a/js/misc/fileUtils.js +++ b/js/misc/fileUtils.js @@ -5,26 +5,6 @@ const GLib = imports.gi.GLib; const Lang = imports.lang; const Params = imports.misc.params; -function listDirAsync(file, callback) { - let allFiles = []; - file.enumerate_children_async('standard::name,standard::type', - Gio.FileQueryInfoFlags.NONE, - GLib.PRIORITY_LOW, null, function (obj, res) { - let enumerator = obj.enumerate_children_finish(res); - function onNextFileComplete(obj, res) { - let files = obj.next_files_finish(res); - if (files.length) { - allFiles = allFiles.concat(files); - enumerator.next_files_async(100, GLib.PRIORITY_LOW, null, onNextFileComplete); - } else { - enumerator.close(null); - callback(allFiles); - } - } - enumerator.next_files_async(100, GLib.PRIORITY_LOW, null, onNextFileComplete); - }); -} - function collectFromDatadirs(subdir, includeUserDir, processFile) { let dataDirs = GLib.get_system_data_dirs(); if (includeUserDir)