import { PathConfigType } from '@osd/utils' ; import { mkdir } from './fs' ; import { Logger } from '../logging' ; export async function createDataFolder ( { pathConfig , logger , } ) { const dataFolder = pathConfig . data ; try { await mkdir ( dataFolder , { recursive : true } ) ; } catch ( e ) { logger . error ( `Error trying to create data folder at ${ dataFolder }: ${ e }` ) ; throw e ; } }