This commit is contained in:
2017-05-01 19:49:34 +02:00
parent dcc85a56b8
commit 9fc581b866
5 changed files with 16 additions and 10 deletions

View File

@ -220,10 +220,13 @@ export let fileTreeToObject = async (dirPathArg: string, miniMatchFilter: string
let fileTree = await listFileTree(dirPath, miniMatchFilter)
let smartfileArray: Smartfile[] = []
for (let filePath of fileTree) {
let fileContentString = toStringSync(
plugins.path.join(dirPath, filePath)
)
// push a read file as Smartfile
smartfileArray.push(new Smartfile({
contentBuffer: new Buffer(toStringSync(
plugins.path.join(dirPath, filePath)
)),
contentBuffer: new Buffer(fileContentString),
base: dirPath,
path: filePath
}))