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

LibCore: Remove Stream::is_{readable,writable}

Next to functions like `is_eof` these were really confusing to use, and
the `read`/`write` functions should fail anyways if a stream is not
readable/writable.
This commit is contained in:
Tim Schumacher 2022-12-11 17:15:48 +01:00 committed by Andreas Kling
parent 5a346c4297
commit 5061a905ff
7 changed files with 1 additions and 32 deletions

View file

@ -229,9 +229,6 @@ ErrorOr<void> File::open_path(StringView filename, mode_t permissions)
return {};
}
bool File::is_readable() const { return has_flag(m_mode, OpenMode::Read); }
bool File::is_writable() const { return has_flag(m_mode, OpenMode::Write); }
ErrorOr<Bytes> File::read(Bytes buffer)
{
if (!has_flag(m_mode, OpenMode::Read)) {