diff options
| author | netop://ウィビ <paul@webb.page> | 2026-04-11 14:24:49 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-04-11 14:24:49 -0700 |
| commit | 8c34d810af95fae0ef846f54370a8c88bfab7123 (patch) | |
| tree | 436beaf30f7b2b3f15741dd54a37e313964d1f7d /src/helper/get-file-contents.ts | |
Diffstat (limited to 'src/helper/get-file-contents.ts')
| -rw-r--r-- | src/helper/get-file-contents.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/helper/get-file-contents.ts b/src/helper/get-file-contents.ts new file mode 100644 index 0000000..a159f95 --- /dev/null +++ b/src/helper/get-file-contents.ts @@ -0,0 +1,14 @@ + + + +/*** EXPORT ------------------------------------------- ***/ + +export default async(filePath: string) => { + const fileExists = await Deno.stat(filePath); + + if (!fileExists) + return ""; + + const content = await Deno.readTextFile(filePath); + return content; +} |
