1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:07:46 +00:00

LibFileSystem+Userland: Rename size() to size_from_stat()

This reflects what the functions does more accurately, and allows for
adding functions to get sizes through other methods.

This also corrects the return type of said function, as size_t may only
hold sizes up to 4GB on 32-bit platforms.
This commit is contained in:
implicitfield 2024-01-16 12:05:18 +04:00 committed by Andrew Kaster
parent d3c6e31bf3
commit 896f213c6f
5 changed files with 5 additions and 5 deletions

View file

@ -39,7 +39,7 @@ void Playlist::try_fill_missing_info(Vector<M3UEntry>& entries, StringView path)
entry.path = ByteString::formatted("{}/{}", playlist_path.dirname(), entry.path);
if (!entry.extended_info->file_size_in_bytes.has_value()) {
auto size = FileSystem::size(entry.path);
auto size = FileSystem::size_from_stat(entry.path);
if (size.is_error())
continue;
entry.extended_info->file_size_in_bytes = size.value();