From 00a0711da684436e0c9af0054b9264fedd14d3f8 Mon Sep 17 00:00:00 2001 From: Henrik Date: Sun, 14 Apr 2024 23:31:27 +0200 Subject: [PATCH] Include file sizes --- backend/filemanagement.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/filemanagement.py b/backend/filemanagement.py index 3f5a80b..78b4df7 100644 --- a/backend/filemanagement.py +++ b/backend/filemanagement.py @@ -12,6 +12,7 @@ isabs, commonpath, getmtime, + getsize, ) import logging import traceback @@ -73,8 +74,9 @@ def list_of_files_in_directory(folder): ] files_list = map( lambda file: { - "name": (os.path.basename(file)), - "lastModified": (getmtime(file)), + "name": os.path.basename(file), + "lastModified": getmtime(file), + "size": getsize(file), }, files, )