(fileStat: Stats)
| 13 | import fs, {Stats} from 'fs'; |
| 14 | |
| 15 | export function isExecutable(fileStat: Stats): boolean { |
| 16 | if (process.platform === 'win32') { |
| 17 | return true; |
| 18 | } |
| 19 | |
| 20 | return Boolean(fileStat.mode & 0o0001 || fileStat.mode & 0o0010 || fileStat.mode & 0o0100); |
| 21 | } |
| 22 | |
| 23 | export function getBase64FileData(filePath: string): Promise<string | null> { |
| 24 | return new Promise((resolve): void => { |