kist
Version:
Package Pipeline Processor
43 lines (42 loc) • 1.68 kB
TypeScript
import { Action } from "../../core/pipeline/Action";
import { ActionOptionsType } from "../../types";
/**
* DirectoryCopyAction is a step action responsible for copying all files and
* subdirectories from one directory to another, using asynchronous operations
* for efficient handling.
*/
export declare class DirectoryCopyAction extends Action {
/**
* Executes the directory copy action.
* @param options - The options specific to directory copying, including
* the source and destination paths.
* @returns A Promise that resolves when the directory contents have been
* successfully copied, or rejects with an error if the action fails.
*/
execute(options: ActionOptionsType): Promise<void>;
/**
* Asynchronously copies all files and subdirectories from the source
* directory to the destination directory. If the destination directory
* does not exist, it will be created.
*
* @param srcDir - The path of the source directory.
* @param destDir - The path of the destination directory.
* @throws {Error} If any file or directory could not be copied.
*/
private copyFiles;
/**
* Recursively copies files and directories from the source to the
* destination directory.
* This method creates the destination directory if it does not exist and
* recursively copies all nested files and directories.
*
* @param srcDir - Source directory.
* @param destDir - Destination directory.
*/
private recursiveCopy;
/**
* Provides a description of the action.
* @returns A string description of the action.
*/
describe(): string;
}