aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/file.ts')
-rw-r--r--shared/extra-utils/file.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/extra-utils/file.ts b/shared/extra-utils/file.ts
new file mode 100644
index 000000000..8060ab520
--- /dev/null
+++ b/shared/extra-utils/file.ts
@@ -0,0 +1,11 @@
1import { stat } from 'fs-extra'
2
3async function getFileSize (path: string) {
4 const stats = await stat(path)
5
6 return stats.size
7}
8
9export {
10 getFileSize
11}