Can `fileCallback` & `dirCallback` support async function ?
yodhcn opened this issue · 2 comments
yodhcn commented
This is my application scenario.
const dree = require('dree');
const { getAudioMetadata } = require('../ffmpeg');
// ...
const fileCallback = async element => {
if (element.extension === 'mp3') {
const audioMetadata = await getAudioMetadata(element.path);
element.audioMetadata = audioMetadata;
}
delete element.path;
};
// ...
const tree = dree.scanAsync(path, options, fileCallback, dirCallback)
euberdeveloper commented
Hi, actually now they do not support it, but I could add it in not too much time
euberdeveloper commented
Solved, with the new version 2.6.0
, for scanAsync
, you can pass async callbacks