( absolutePath: string, platform: NodeJS.Platform = process.platform, )
| 37 | } |
| 38 | |
| 39 | export function revealFileCommandFor( |
| 40 | absolutePath: string, |
| 41 | platform: NodeJS.Platform = process.platform, |
| 42 | ): LaunchCommand { |
| 43 | switch (platform) { |
| 44 | case 'darwin': |
| 45 | return { command: 'open', args: ['-R', absolutePath] }; |
| 46 | case 'win32': |
| 47 | return { command: 'explorer.exe', args: [`/select,${absolutePath}`] }; |
| 48 | default: |
| 49 | return { command: 'xdg-open', args: [path.dirname(absolutePath)] }; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | export type OpenInAppId = |
| 54 | | 'finder' |
no outgoing calls
no test coverage detected