(targetPath)
| 62 | } |
| 63 | |
| 64 | export async function isFile(targetPath) { |
| 65 | try { |
| 66 | const stats = await fs.stat(targetPath); |
| 67 | return stats.isFile(); |
| 68 | } catch { |
| 69 | return false; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | export async function readText(targetPath) { |
| 74 | return fs.readFile(targetPath, "utf8"); |