///
import { MakeDirectoryOptions } from 'fs';
import { SpawnOptions } from 'child_process';
import { Optional } from '../../typings/standard-types';
import { Options, ResultMap } from '../../typings/domain-types';
export declare namespace Files {
interface ExecResult {
status: number;
stdout: string;
stderr: string;
}
export const getHtmlContent: (htmlPath: string) => string;
export const writeToFile: (value: ArrayLike | ArrayBufferLike, fileName: string) => void;
export const getConfigFileName: (baseDir: string, configFileName: string) => Optional;
/**
* Given a Git URL, computes a semi-human-readable name for a folder in which to
* clone the repository.
*/
export const cacheDirFromUrl: (url: URL) => string;
export const pathWithoutExtension: (fullPath: string, extension: string) => string;
export const graphQLSchemaFilename: (baseName: string) => string;
export const mapFile: (source: string, destination: string, transform: (content: string) => string) => void;
export const downloadFileProtocol: (pkgUrl: URL) => Optional;
export const getBuffer: (stream: any) => Promise;
export const checkCwdOption: (options?: {}) => void;
/**
* Reads the `package.json` data in a given path.
*
* Don't cache the data.
*
* @param {string} dir - The path to a directory to read.
* @returns {object|null} The read `package.json` data, or null.
*/
export const readPackageJson: (dir: any) => any;
export const getContent: (dir: string, filename: string) => string[];
/**
* Check whether the file exists or not.
* @param {string} filePath The file path to check.
* @param regex regex to validate by
* @returns {boolean} `true` if the file exists.
*/
export const existsCaseSensitive: (filePath: string, regex?: RegExp) => boolean;
export const exists: (filePath: string) => boolean;
export const getFilesizeInBytes: (filename: string) => number;
export function processFiles(files: string[], opts: Options): Promise;
export const getDirectory: (filepath: string) => Promise;
export const getDirectorySync: (filepath: string) => string;
export const fsReadFileAsync: (pathname: string, encoding: string) => Promise;
export const readFileAsyncOrThrow: (filepath: string, options?: Options) => Promise>;
export const readFileAndSync: (filepath: string, options?: Options) => Optional;
export const createFilePath: (locations: {
path;
name;
extension;
}) => string;
export const checkFileExist: (path: string) => Promise;
export const createRandomDataFile: (numBytes: number) => string;
export const checkFilesExist: (fileList: string[]) => Promise;
export const rmdirRecursive: (baseDir: string) => void;
export const pathSplit: (value: string) => string[];
export const fsReadDir: (pth: string) => any;
export const packageRoot: (pth: string) => any;
export const packageRequires: (pth: string, a?: string[]) => any;
export const downloadReadme: (pth: string, o: any) => void;
export const extractErrorsFromLogs: (outputPath: string) => string[];
export const getEnvVariables: () => Promise<{
[key: string]: string;
}>;
export const convertItemListToArray: (itemList: DataTransferItemList) => DataTransferItem[];
export const getFolderNameFromPathname: (pathname: string) => Optional;
export const isFolderNameValid: (name: string) => boolean;
export const isFolderPathnameValid: (pathname: string) => boolean;
export const isSubPathname: (rootPathname: string, targetPathname: string) => boolean;
export const isDirectSubPathname: (rootPathname: string, targetPathname: string) => boolean;
export const filterByExtension: (fileNames: string[], extension?: string) => string[];
export const appendFileProtocol: (pathname: string) => string;
export const readAsText: (file: File) => Promise;
export const convertFileListToArray: (fileList: FileList) => File[];
export const inspectDataTransfer: (dataTransfer: DataTransfer) => any;
export const ensureDirExists: (dir: string, options?: MakeDirectoryOptions) => void;
export const getFileJson: (path: string) => any;
export const isValidFile: (fileName: string, extension?: string) => boolean;
export const checkFileExists: (fileName: string, mode?: number) => boolean;
/**
* @param {string} filePath
* @returns {any}
*/
export const readJsonFile: (filePath: string) => string;
export const collectFileName: (dirName: string) => string[];
export const exec: (cmd: string, args: string[], options: SpawnOptions) => Promise;
export const isGradleFile: (path: string) => boolean;
export const isPropsFile: (path: string) => boolean;
export const toAbsolutePath: (packageFile: string) => string;
export const readString: (...paths: string[]) => Promise;
export const reorderFiles: (packageFiles: string[]) => string[];
export const determineJavaVersion: () => number;
export {};
}
//# sourceMappingURL=files.d.ts.map