MCPcopy Create free account
hub / github.com/anomalyco/opencode / absolute

Function absolute

packages/core/src/database/path.ts:14–20  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

12}
13
14function absolute(input: string) {
15 const result = storagePath(input)
16 if (!nodePath.posix.isAbsolute(result) && !(process.platform === "win32" && isWindowsStoragePath(result))) {
17 throw new Error(`Path is not absolute: ${input}`)
18 }
19 return result
20}
21
22function toPlatform(input: string) {
23 if (process.platform !== "win32" || !isWindowsStoragePath(input)) return input

Callers 2

toDriverFunction · 0.70
fromDriverFunction · 0.70

Calls 2

storagePathFunction · 0.85
isWindowsStoragePathFunction · 0.85

Tested by

no test coverage detected