MCPcopy
hub / github.com/zh-lx/code-inspector / getRelativeOrAbsolutePath

Function getRelativeOrAbsolutePath

packages/core/src/server/server.ts:37–42  ·  view source on GitHub ↗
(
  filePath: string,
  pathType?: PathType
)

Source from the content-addressed store, hash-verified

35
36// 根据用户配置返回绝对路径或者相对路径
37export function getRelativeOrAbsolutePath(
38 filePath: string,
39 pathType?: PathType
40) {
41 return pathType === 'relative' ? getRelativePath(filePath) : filePath;
42}
43
44export function createServer(
45 callback: (port: number) => any,

Callers 2

transformCodeFunction · 0.90
getNodeFilePathFunction · 0.90

Calls 1

getRelativePathFunction · 0.85

Tested by

no test coverage detected