debug mode: export sync plans

This commit is contained in:
fyears
2021-11-07 13:58:51 +08:00
parent b9c17076b4
commit 62aea9d330
6 changed files with 171 additions and 14 deletions
+3
View File
@@ -52,9 +52,12 @@ export const getFolderLevels = (x: string) => {
};
export const mkdirpInVault = async (thePath: string, vault: Vault) => {
console.log(thePath);
const foldersToBuild = getFolderLevels(thePath);
console.log(foldersToBuild);
for (const folder of foldersToBuild) {
const r = await vault.adapter.exists(folder);
console.log(r);
if (!r) {
console.log(`mkdir ${folder}`);
await vault.adapter.mkdir(folder);