(fileUrl: string)
| 55 | } |
| 56 | |
| 57 | export function decodeFileUrlToPath(fileUrl: string): string { |
| 58 | try { |
| 59 | return fileURLToPath(fileUrl) |
| 60 | } catch { |
| 61 | const fallbackPath = fileUrl.replace(/^file:\/\/\//, '').replace(/\//g, '\\') |
| 62 | try { |
| 63 | return decodeURIComponent(fallbackPath) |
| 64 | } catch { |
| 65 | return fallbackPath |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * 根据窗口类名与 hwnd 读取 Explorer 当前目录。 |
no outgoing calls
no test coverage detected