UNPKG

@ply-ct/ply

Version:

REST API Automated Testing

40 lines (39 loc) 938 B
/** * Abstraction for a URL or file location. */ export declare class Location { readonly path: string; /** * @param path url or file path (backslashes are replaced with slashes) */ constructor(path: string); private get lastSlash(); /** * Undefined if no parent path */ get parent(): string | undefined; get name(): string; /** * Name without extension */ get base(): string; get ext(): string | undefined; /** * Returns zero for URLs, undefined if file does not exist */ get timestamp(): number | undefined; get isYaml(): boolean; get scheme(): string | undefined; get isUrl(): boolean; get isAbsolute(): boolean; get absolute(): string; /** * TODO: handle urls */ isChildOf(parent: string): boolean; /** * TODO: handle urls */ relativeTo(parent: string): string; toString(): string; }