@nori-zk/proof-conversion
Version:
Verifying zkVM proofs inside o1js circuits, to generate Mina compatible proof
29 lines • 1.1 kB
JavaScript
import { mkdirSync } from 'fs';
import { join } from 'path';
// Utility function to create directories based on the structure
export function createDirectories(baseDir, structure) {
if (Array.isArray(structure)) {
// If structure is an array, create directories directly in baseDir
structure.forEach((subDir) => {
const dirPath = join(baseDir, subDir);
mkdirSync(dirPath, { recursive: true });
console.log(`Created: ${dirPath}`);
});
}
else {
// If structure is an object, process it as before
Object.entries(structure).forEach(([parentDir, subDirs]) => {
subDirs.forEach((subDir) => {
const dirPath = join(baseDir, parentDir, subDir);
mkdirSync(dirPath, { recursive: true });
console.log(`Created: ${dirPath}`);
});
});
}
}
// Utility function to create directory
export function createDirectory(dirPath) {
mkdirSync(dirPath, { recursive: true });
console.log(`Created: ${dirPath}`);
}
//# sourceMappingURL=cache.js.map