INNER CODE UNIT · TypeScript
ensureDirectoryStructure
linode/apl-core · src/operator/main.ts:53
function ensureDirectoryStructure() {
const repoPath = env.ENV_DIR
const parentDir = path.dirname(repoPath)
if (!fs.existsSync(parentDir)) {
fs.mkdirSync(parentDir, { recursive: true })
}
if (!fs.existsSync(repoPath)) {
fs.mkdirSync(repoPath, { recursive: true })
}
}
async function main(): Promise<void> {
try {
d.info('Starting APL Operator')
ensureDirectoryStructure()
const aplOps = new AplOperations()