cli-stash
Version:
CLI application to manage and work with Atlassian Stash. Work with your Stash project and repositories from Command lines.
42 lines (41 loc) • 1.65 kB
TypeScript
/**
* Class to create and write files into file system
*/
export declare class FileWriter {
/**
* Method to create files asynchronously
* @param {string} path path to save the file
* @param {string} content content to write into the file
* @param {Function} [callback] callback function to handle the end of write
*/
static createFile(path: string, content: string, callback?: (err?: Error) => void): void;
/**
* Method to create files synchronously
* @param {string} path path to save the file
* @param {string} content content to write into the file
*/
static createFileSync(path: string, content: string | any): void;
/**
* Method to create folders synchronously (create the entire folders path if is needed)
* @param {string} folderPath folder to create
*/
static createFolderSync(folderPath: string): void;
/**
* Method to copy files asynchronously
* @param {string} source source file
* @param {string} target target file
* @param {Function} callback callback function to handle the end of copy
*/
static copyFile(source: string, target: string, callback: (err?: Error) => void): void;
/**
* Method to copy files synchronously
* @param {string} source source file
* @param {string} target target file
*/
static copyFileSync(sourcePath: string, targetPath: string): void;
/**
* Method to delete and entire folder (and all subfolders)
* @param {string} pathToDelete folder to delete
*/
static delete(pathToDelete: string): void;
}