Skip to main content
Module

x/pbkit/node/fs.js

Protobuf toolkit for modern web development
Go to Latest
File
const fs = require("fs/promises");
async function exists(path) { try { await fs.access(path); return true; } catch { return false; }}exports.exists = exists;
async function ensureDir(path) { if (await exists(path)) return; await fs.mkdir(path, { recursive: true });}exports.ensureDir = ensureDir;