Timestamps a bit less ugly.
This commit is contained in:
parent
d9c883eb9b
commit
e328d4406b
@ -35,7 +35,7 @@ class DirectoryHandler:
|
|||||||
|
|
||||||
def _prepare_file(self, path: Path) -> Dict[str, Union[int, str]]:
|
def _prepare_file(self, path: Path) -> Dict[str, Union[int, str]]:
|
||||||
stat = path.stat()
|
stat = path.stat()
|
||||||
modified = datetime.fromtimestamp(stat.st_mtime)
|
modified = datetime.fromtimestamp(stat.st_mtime).isoformat()[:19].replace("T", " ")
|
||||||
is_dir = S_ISDIR(stat.st_mode)
|
is_dir = S_ISDIR(stat.st_mode)
|
||||||
icon = "📁" if is_dir else "📄"
|
icon = "📁" if is_dir else "📄"
|
||||||
file_name = path.name
|
file_name = path.name
|
||||||
@ -45,7 +45,7 @@ class DirectoryHandler:
|
|||||||
"priority": is_dir * -1,
|
"priority": is_dir * -1,
|
||||||
"file_name": file_name,
|
"file_name": file_name,
|
||||||
"icon": icon,
|
"icon": icon,
|
||||||
"file_access": modified.isoformat(),
|
"file_access": modified,
|
||||||
"file_size": stat.st_size,
|
"file_size": stat.st_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user