fix(core): update

This commit is contained in:
2021-12-03 00:24:10 +01:00
parent b2482ab8a5
commit 27f60f6719
7 changed files with 32 additions and 130 deletions

View File

@ -373,3 +373,15 @@ export const listFileTree = async (
return fileList;
};
/**
* checks wether a file is ready for processing
*/
export const waitForFileToBeReady = async (filePathArg: string) => {
const limitedArray = new plugins.lik.LimitedArray<string>(3);
if(!plugins.path.isAbsolute(filePathArg)) {
filePathArg = plugins.path.resolve(filePathArg);
};
const stats = await plugins.fsExtra.stat(filePathArg);
stats.size
}