@grnsft/if
Version:
Impact Framework
21 lines (20 loc) • 711 B
TypeScript
/**
* Checks if file exists with the given `filePath`.
*/
export declare const isFileExists: (filePath: string) => Promise<boolean>;
/**
* Checks if the directory exists with the given `filePath`.
*/
export declare const isDirectoryExists: (directoryPath: string) => Promise<boolean>;
/**
* Gets all files that have either .yml or .yaml extension in the given directory.
*/
export declare const getYamlFiles: (directory: string) => Promise<string[]>;
/**
* Gets fileName from the given path without an extension.
*/
export declare const getFileName: (filePath: string) => string;
/**
* Removes the given file if exists.
*/
export declare const removeFileIfExists: (filePath: string) => Promise<void>;