MCPcopy Index your code
hub / github.com/ZToolsCenter/ZTools / getSingleFilePathParam

Function getSingleFilePathParam

src/main/api/renderer/systemCommands.ts:19–25  ·  view source on GitHub ↗
(param: any)

Source from the content-addressed store, hash-verified

17}
18
19function getSingleFilePathParam(param: any): string | undefined {
20 if (param?.type !== 'files' || !Array.isArray(param.payload) || param.payload.length !== 1) {
21 return undefined
22 }
23
24 return typeof param.payload[0]?.path === 'string' ? param.payload[0].path : undefined
25}
26
27/**
28 * Windows 窗口信息类型

Callers 2

handleCopyPathFunction · 0.85
handleOpenTerminalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected