summaryrefslogtreecommitdiff
path: root/src/helper/get-file-contents.ts
diff options
context:
space:
mode:
authornetop://ウィビ <paul@webb.page>2026-04-11 14:24:49 -0700
committernetop://ウィビ <paul@webb.page>2026-04-11 14:24:49 -0700
commit8c34d810af95fae0ef846f54370a8c88bfab7123 (patch)
tree436beaf30f7b2b3f15741dd54a37e313964d1f7d /src/helper/get-file-contents.ts
initial commitHEADprimary
Diffstat (limited to 'src/helper/get-file-contents.ts')
-rw-r--r--src/helper/get-file-contents.ts14
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;
+}