import type { JsonFile, PackageJson, TextFile } from '@stacksjs/types';

export declare function readJsonFile(name: string, cwd?: string): Promise<JsonFile>;
export declare function readPackageJson(name: string, cwd?: string): Promise<PackageJson>;
export declare function writeFile(path: string, data: any): Promise<number>;
export declare function writeJsonFile(file: JsonFile): Promise<number>;
export declare function readTextFile(name: string, cwd?: string): Promise<TextFile>;
export declare function writeTextFile(file: TextFile): Promise<number>;
declare function isFile(path: string): boolean;
export declare function doesExist(path: string): boolean;
export declare function doesNotExist(path: string): boolean;
export declare function hasFiles(folder: string): boolean;
export declare function hasComponents(): boolean;
export declare function hasFunctions(): boolean;
export declare function deleteFiles(dir: string, exclude: string[]): void;
export declare function getFiles(dir: string, exclude: string[]): string[];
export declare function put(path: string, contents: string): void;
export declare function get(path: string): Promise<string>;
export declare interface Files {
  readJsonFile: typeof readJsonFile
  readPackageJson: typeof readPackageJson
  readTextFile: typeof readTextFile
  writeJsonFile: typeof writeJsonFile
  writeTextFile: typeof writeTextFile
  hasFiles: typeof hasFiles
  hasComponents: typeof hasComponents
  hasFunctions: typeof hasFunctions
  deleteFiles: typeof deleteFiles
  getFiles: typeof getFiles
  put: typeof put
  get: typeof get
}
export declare const files: Files;