MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / openPath

Function openPath

source code/utils/browser.ts:26–39  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

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

Callers 3

_temp2Function · 0.85
MemoryFileSelectorFunction · 0.85
MemoryFileRowFunction · 0.85

Calls 1

execFileNoThrowFunction · 0.85

Tested by

no test coverage detected