import fsP from "node:fs/promises";
import path from "node:path";

//#region src/utils/fs.ts
/**
* Ensures that the parent directory of the specified file exists.
*/
const ensureDirectoryExists = async (filePath) => {
	const parent = path.dirname(path.resolve(filePath));
	await fsP.mkdir(parent, { recursive: true });
};

//#endregion
export { ensureDirectoryExists as t };
//# sourceMappingURL=fs.js.map