Convert file system to use callbacks instead of promises.

This commit is contained in:
Glenn Ruehle committed 2013-10-05 07:31:33 -07:00
1 parent 5352487483
commit b1ad00c09b
22 files changed
+457 -509

No files matched your search

@@ -179,8 +179,8 @@ define(function (require, exports, module) {
directory = fileSystem.getDirectoryForPath(dir),
files = [];
fileSystem.getDirectoryContents(directory)
.done(function (contents) {
fileSystem.getDirectoryContents(directory, function (err, contents) {
if (!err) {
contents.slice(0, preferences.getMaxFileCount()).forEach(function (entry) {
var path = entry.fullPath,
split = HintUtils.splitPath(path),
@@ -202,13 +202,13 @@ define(function (require, exports, module) {
}
});
doneCallback();
})
.fail(function (err) {
} else {
if (errorCallback) {
errorCallback(err);
}
console.log("Unable to refresh directory: ", err);
});
}
});
}
/**