diff --git a/app/src/utils.tsx b/app/src/utils.tsx index 5af1c35..adce913 100644 --- a/app/src/utils.tsx +++ b/app/src/utils.tsx @@ -37,6 +37,11 @@ export function isDir(path: string): boolean { } } +export async function mtime(path: string): Promise { + const { mtime } = await stat(path) + return mtime +} + // is the given file binary? export async function isBinaryFile(path: string): Promise { // Create a stream to read just the beginning