import { Encoding } from "./constants.mjs";
import { Mode, ObjectEncodingOptions, OpenMode, WriteFileOptions as WriteFileOptions$1 } from "node:fs";
import { Abortable } from "node:events";

//#region src/write-file.d.ts
interface WriteFileOptions {
  /**
   * Whether to create the directory if it does not exist
   *
   * @defaultValue true
   */
  createDirectory?: boolean;
}
/**
 * Write the given content to the given file path
 *
 * @param filePath - The file path to write to
 * @param content - The content to write to the file
 */
declare const writeFileSync: (filePath: string, content?: string, options?: WriteFileOptions & WriteFileOptions$1) => void;
/**
 * Read the given content to the given file path
 *
 * @param filePath - The file path to read to
 * @param content - The content to write to the file
 * @returns The content of the file
 */
declare const writeFile: (filePath: string, content?: string, options?: WriteFileOptions & ((ObjectEncodingOptions & {
  mode?: Mode | undefined;
  flag?: OpenMode | undefined;
  flush?: boolean | undefined;
} & Abortable) | Encoding)) => Promise<void>;
//#endregion
export { WriteFileOptions, writeFile, writeFileSync };
//# sourceMappingURL=write-file.d.mts.map