Commit e138a209 authored by yann300's avatar yann300

include in promise

parent a5d0d86d
......@@ -198,10 +198,10 @@ class FileManager extends ApiFactory {
}
getFilesFromPath (path) {
const provider = this.fileProviderOf(path)
if (!provider) throw new Error(`provider for path ${path} not found`)
// TODO : Change provider with promise
return new Promise((resolve, reject) => {
const provider = this.fileProviderOf(path)
if (!provider) return reject(`provider for path ${path} not found`)
provider.resolveDirectory(path, (error, filesTree) => {
if (error) reject(error)
resolve(filesTree)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment