Minima.js API / @minimajs/multipart / helpers / ensurePath
Function: ensurePath()
ts
function ensurePath(...paths): Promise<string>;Defined in: packages/multipart/src/helpers.ts:61
Ensures a directory path exists, creating it recursively if needed.
Parameters
paths
...string[]
Returns
Promise<string>
Example
ts
const dir = await ensurePath('/uploads', 'images');
// Creates /uploads/images if it doesn't exist