1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27:35 +00:00

AK+Userland: Return String from human_readable_size() functions

This commit is contained in:
Sam Atkins 2024-01-24 12:16:32 +00:00 committed by Andreas Kling
parent 7e8cfb60eb
commit 388856dc7e
7 changed files with 23 additions and 23 deletions

View file

@ -60,7 +60,7 @@ ErrorOr<String> load_file_directory_page(AK::URL const& url)
contents.append("<tr>"sv);
contents.appendff("<td><span class=\"{}\"></span></td>", is_directory ? "folder" : "file");
contents.appendff("<td><a href=\"file://{}\">{}</a></td><td>&nbsp;</td>"sv, path, name);
contents.appendff("<td>{:10}</td><td>&nbsp;</td>", is_directory ? "-" : human_readable_size(st.st_size));
contents.appendff("<td>{:10}</td><td>&nbsp;</td>", is_directory ? "-"_string : human_readable_size(st.st_size));
contents.appendff("<td>{}</td>"sv, Core::DateTime::from_timestamp(st.st_mtime).to_byte_string());
contents.append("</tr>\n"sv);
}