UNPKG

@crestron/ch5-shell-utilities-cli

Version:
88 lines (87 loc) 2.08 kB
export declare class Ch5CliUtil { /** * Read directory async * @param path * @returns */ readdirAsync(path: string): Promise<any>; /** * Delete directory by path * @param {string} directoryName */ deleteFolder(directoryName: string): any; /** * Delete File * @param {string} completeFilePath */ deleteFile(completeFilePath: string): any; /** * Write Error * @param error */ writeError(error: Error): void; /** * Read File Content * @param path * @returns */ readFileContent(path: string): Promise<string>; /** * Read File Content Sync * @param path * @returns */ readFileContentSync(path: string): any; /** * Read File * @param path * @returns */ readFile(path: string): Promise<string>; /** * Check if input is valid. Invalid are "", {}, [], null, undefined. * @param {*} input */ isValidInput(input: any): boolean; /** * * @param {*} input */ isValidObject(input: any): boolean; /** * Convert string to array * @param {*} inputArray */ convertArrayToString(inputArray: string[], delimiter?: string): string; /** * Convert string to boolean * @param {*} input */ convertStringToBoolean(input: string): boolean; /** * Gets the text from the config default.json file. * @param {*} key * @param {...any} values */ getText(DYNAMIC_TEXT_MESSAGES: any, key: string, ...values: string[]): any; /** * * @param input * @param isEmptyValueEqualToTrue * @returns */ toBoolean(input: any, isEmptyValueEqualToTrue?: boolean): boolean; /** * * @param {*} order * @param {...any} property */ dynamicSort(order: string, ...property: any): (a: any, b: any) => number; /** * * @param {*} str * @param {*} find * @param {*} replace */ replaceAll(str: string, find: string, replace: string): string; }