cli-stash
Version:
CLI application to manage and work with Atlassian Stash. Work with your Stash project and repositories from Command lines.
37 lines (36 loc) • 1.24 kB
TypeScript
/**
* Class with Utils methods for handle paths
*/
export declare class PathUtils {
/**
* Method to get the file name from a path
* @param {string} filePath path to process
* @param {string} [extension] file extension to remove
*
* @returns {string} Returns the file name
*/
static getBasename(filePath: string, extension?: string): string;
/**
* Method to get an absolute path from a file or folder path and replace \\ characters with /
* @param {string} filePath path to process
*
* @returns {string} Returns the absolute file path
*/
static getAbsolutePath(filePath: string): string;
/**
* Method to get the directory name from a path
* @param {string} filePath path to process
*
* @returns {string} Return the folder name
*/
static getDirname(filePath: string): string;
/**
* Method to remove a file extension from file path
* @param {string} file file to process
*
* @returns {string} Returns the path without extension file
*/
static removeFileExtension(file: string): string;
static getFileExtension(file: string): string;
static homeDir(): string;
}