UNPKG

@eighty4/c2

Version:

Cross platform cloud config tooling for cloud-init

16 lines (15 loc) 354 B
import { readdir, readFile, stat } from 'node:fs/promises'; export async function doesDirExist(p) { try { return (await stat(p)).isDirectory(); } catch (ignore) { return false; } } export async function readDirListing(p) { return readdir(p); } export async function readToString(p) { return readFile(p, 'utf8'); }