MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / openPath

Function openPath

src/utils/browser.ts:24–37  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

22 * Uses `open` on macOS, `explorer` on Windows, `xdg-open` on Linux.
23 */
24export async function openPath(path: string): Promise<boolean> {
25 try {
26 const platform = process.platform
27 if (platform === 'win32') {
28 const { code } = await execFileNoThrow('explorer', [path])
29 return code === 0
30 }
31 const command = platform === 'darwin' ? 'open' : 'xdg-open'
32 const { code } = await execFileNoThrow(command, [path])
33 return code === 0
34 } catch (_) {
35 return false
36 }
37}
38
39export async function openBrowser(url: string): Promise<boolean> {
40 try {

Callers 3

FullscreenLayoutFunction · 0.85
MemoryFileSelectorFunction · 0.85
MemoryFileRowFunction · 0.85

Calls 1

execFileNoThrowFunction · 0.70

Tested by

no test coverage detected