diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-17 11:58:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-17 12:24:03 +0100 |
commit | c55e3d7227fe1453869e309025996b9d75256d5d (patch) | |
tree | 08e9b0ca210d75c82c8606fef0852eca020e8e0e /shared/extra-utils | |
parent | bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff) | |
download | PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip |
Move test functions outside extra-utils
Diffstat (limited to 'shared/extra-utils')
-rw-r--r-- | shared/extra-utils/file.ts | 11 | ||||
-rw-r--r-- | shared/extra-utils/index.ts | 1 |
2 files changed, 12 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 @@ | |||
1 | import { stat } from 'fs-extra' | ||
2 | |||
3 | async function getFileSize (path: string) { | ||
4 | const stats = await stat(path) | ||
5 | |||
6 | return stats.size | ||
7 | } | ||
8 | |||
9 | export { | ||
10 | getFileSize | ||
11 | } | ||
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts index 5710c5ab5..38303cf1f 100644 --- a/shared/extra-utils/index.ts +++ b/shared/extra-utils/index.ts | |||
@@ -1 +1,2 @@ | |||
1 | export * from './ffprobe' | 1 | export * from './ffprobe' |
2 | export * from './file' | ||