mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +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:
committed by
Andrew Kaster
parent
d3c6e31bf3
commit
896f213c6f
@@ -350,7 +350,7 @@ ErrorOr<void> remove(StringView path, RecursionMode mode)
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<size_t> size(StringView path)
|
||||
ErrorOr<off_t> size_from_stat(StringView path)
|
||||
{
|
||||
auto st = TRY(Core::System::stat(path));
|
||||
return st.st_size;
|
||||
|
||||
Reference in New Issue
Block a user