denoland / denokv

A self-hosted backend for Deno KV
https://deno.com/kv
MIT License
456 stars 21 forks source link

Create subdirectories for Deno.openKv calls #62

Open mcgear opened 8 months ago

mcgear commented 8 months ago

My rust skills are garbage, otherwise i would just provide a PR.

The issue i am facing is that if i try to open a KV instance in a sub directory, it fails if the directory doesn't exist

const denoKv = await Deno.openKv('./denokv/deno.db');

To get around this, we create a ./denokv/.gitkeep file, but it would be nice if it worked with sub directories out of the box by creating the directory if it does not exist.