github.com/jfrog/frogbot@v1.1.1-0.20231221090046-821a26f50338/action/node_modules/@actions/io/lib/io.d.ts (about) 1 /** 2 * Interface for cp/mv options 3 */ 4 export interface CopyOptions { 5 /** Optional. Whether to recursively copy all subdirectories. Defaults to false */ 6 recursive?: boolean; 7 /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 8 force?: boolean; 9 /** Optional. Whether to copy the source directory along with all the files. Only takes effect when recursive=true and copying a directory. Default is true*/ 10 copySourceDirectory?: boolean; 11 } 12 /** 13 * Interface for cp/mv options 14 */ 15 export interface MoveOptions { 16 /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 17 force?: boolean; 18 } 19 /** 20 * Copies a file or folder. 21 * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js 22 * 23 * @param source source path 24 * @param dest destination path 25 * @param options optional. See CopyOptions. 26 */ 27 export declare function cp(source: string, dest: string, options?: CopyOptions): Promise<void>; 28 /** 29 * Moves a path. 30 * 31 * @param source source path 32 * @param dest destination path 33 * @param options optional. See MoveOptions. 34 */ 35 export declare function mv(source: string, dest: string, options?: MoveOptions): Promise<void>; 36 /** 37 * Remove a path recursively with force 38 * 39 * @param inputPath path to remove 40 */ 41 export declare function rmRF(inputPath: string): Promise<void>; 42 /** 43 * Make a directory. Creates the full path with folders in between 44 * Will throw if it fails 45 * 46 * @param fsPath path to create 47 * @returns Promise<void> 48 */ 49 export declare function mkdirP(fsPath: string): Promise<void>; 50 /** 51 * Returns path of a tool had the tool actually been invoked. Resolves via paths. 52 * If you check and the tool does not exist, it will throw. 53 * 54 * @param tool name of the tool 55 * @param check whether to check if tool exists 56 * @returns Promise<string> path to tool 57 */ 58 export declare function which(tool: string, check?: boolean): Promise<string>; 59 /** 60 * Returns a list of all occurrences of the given tool on the system path. 61 * 62 * @returns Promise<string[]> the paths of the tool 63 */ 64 export declare function findInPath(tool: string): Promise<string[]>;