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

Function relativePath

js/botasaurus-js/src/decorators-utils.ts:5–8  ·  view source on GitHub ↗
(filePath:string, goback = 0)

Source from the content-addressed store, hash-verified

3import { getTargetDirectoryPath } from './paths'
4
5function relativePath(filePath:string, goback = 0) {
6 const levels = Array(goback ).fill('..');
7 return path.resolve(getTargetDirectoryPath(), ...levels, filePath.trim());
8}
9
10function createDirectoryIfNotExists(passedPath:string) {
11 const dirPath = relativePath(passedPath);

Callers 6

saveImageFunction · 0.90
CacheClass · 0.90
getBotasaurusStoragePathFunction · 0.90
saveErrorLogsFunction · 0.90

Calls 1

getTargetDirectoryPathFunction · 0.90

Tested by

no test coverage detected