(filepath: string, instructionSetHint?: InstructionSet)
| 139 | } |
| 140 | |
| 141 | static async readFile(filepath: string, instructionSetHint?: InstructionSet): Promise<BinaryInfo | undefined> { |
| 142 | if (os.platform() === 'win32') { |
| 143 | return { |
| 144 | os: OSType.windows, |
| 145 | instructionSet: instructionSetHint || 'amd64', |
| 146 | }; |
| 147 | } |
| 148 | const info = await executeDirect('/usr/bin/file', ['-b', filepath], {}); |
| 149 | if (info.code === 0) return BinaryInfoLinux.parseFileInfo(info.stdout); |
| 150 | return undefined; |
| 151 | } |
| 152 | } |
no test coverage detected