import { BaseOptions, OverwriteOptions } from './types.cjs'; import 'node:fs'; type EnsureDirOptions = Pick; /** * Create directory if not existing. * {@link https://kythuen.github.io/ephemeras/fs/ensureDir | View Details} * * @param path Directory path. * @param options See {@link EnsureDirOptions }. * @returns Result of operation. * * @example * await ensureDir('foo/bar') */ declare function ensureDir(path: string, options?: Partial): Promise; type EnsureFileOptions = Pick & OverwriteOptions; /** * Create file if not existing. * {@link https://kythuen.github.io/ephemeras/fs/ensureFile | View Details} * * @param path File path. * @param content Default content when create not exist file. * * @example * await ensureFile('foo/bar.json', JSON.stringify({ a: 1 })) */ declare function ensureFile(path: string, content?: string, options?: Partial): Promise; export { type EnsureDirOptions, type EnsureFileOptions, ensureDir, ensureFile };