UNPKG

actionhero

Version:

actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks

34 lines (33 loc) 1.29 kB
/** * Check if a directory exists. */ export declare function dirExists(dir: string): boolean; /** * Check if a file exists. */ export declare function fileExists(file: string): boolean; /** * Create a directory, only if it doesn't exist yet. * Throws an error if the directory already exists, or encounters a filesystem problem. */ export declare function createDirSafely(dir: string): string; /** * Create a file, only if it doesn't exist yet. * Throws an error if the file already exists, or encounters a filesystem problem. */ export declare function createFileSafely(file: string, data: string, overwrite?: boolean): string; /** * Create an Actionhero LinkFile, only if it doesn't exist yet. * Throws an error if the file already exists, or encounters a filesystem problem. */ export declare function createLinkfileSafely(filePath: string, type: string): string; /** * Remove an Actionhero LinkFile, only if it exists. * Throws an error if the file does not exist, or encounters a filesystem problem. */ export declare function removeLinkfileSafely(filePath: string): string; /** * Create a system symbolic link. * Throws an error if it encounters a filesystem problem. */ export declare function createSymlinkSafely(destination: string, source: string): string;