MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / relativePath

Function relativePath

js/botasaurus-desktop-api/src/utils.ts:36–39  ·  view source on GitHub ↗
(targetPath: string, goback: number = 0)

Source from the content-addressed store, hash-verified

34}
35
36function relativePath(targetPath: string, goback: number = 0): string {
37 const levels = Array(Math.max(0, goback - 1)).fill('..');
38 return path.resolve(process.cwd(), ...levels, targetPath.trim());
39}
40
41function createDirectoryIfNotExists(passedPath: string): void {
42 const dirPath = relativePath(passedPath, 0);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected