mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Convert file system to use callbacks instead of promises.
This commit is contained in:
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);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user