(path: fs.PathLike)
| 674 | } |
| 675 | |
| 676 | export function statSyncSafe(path: fs.PathLike): fs.Stats | undefined { |
| 677 | try { |
| 678 | return fs.statSync(path, { throwIfNoEntry: false }); |
| 679 | } catch (e) { |
| 680 | return undefined; |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | export function isDirSafe(path: fs.PathLike): boolean { |
| 685 | return !!statSyncSafe(path)?.isDirectory(); |
no outgoing calls
no test coverage detected