1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibFileSystem: Add a helper to get the size of a block device

This commit is contained in:
implicitfield 2024-01-16 14:08:57 +04:00 committed by Andrew Kaster
parent a70d79ff98
commit 8384bb138e
2 changed files with 53 additions and 1 deletions

View file

@ -73,6 +73,8 @@ ErrorOr<void> move_file(StringView destination_path, StringView source_path, Pre
ErrorOr<void> remove(StringView path, RecursionMode);
ErrorOr<off_t> size_from_stat(StringView path);
ErrorOr<off_t> size_from_fstat(int fd);
ErrorOr<off_t> block_device_size_from_ioctl(StringView path);
ErrorOr<off_t> block_device_size_from_ioctl(int fd);
bool can_delete_or_move(StringView path);
ErrorOr<ByteString> read_link(StringView link_path);