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

LibCore: Move Core::Stream::File::exists() to Core::File

`Core::Stream::File` shouldn't hold any utility methods that are
unrelated to constructing a `Core::Stream`, so let's just replace the
existing `Core::File::exists` with the nicer looking implementation.
This commit is contained in:
Tim Schumacher 2022-12-07 21:34:00 +01:00 committed by Sam Atkins
parent bd272e638c
commit 2fc2025f49
10 changed files with 14 additions and 18 deletions

View file

@ -220,7 +220,6 @@ class File final : public SeekableStream {
public:
static ErrorOr<NonnullOwnPtr<File>> open(StringView filename, OpenMode, mode_t = 0644);
static ErrorOr<NonnullOwnPtr<File>> adopt_fd(int fd, OpenMode, ShouldCloseFileDescriptor = ShouldCloseFileDescriptor::Yes);
static bool exists(StringView filename);
static ErrorOr<NonnullOwnPtr<File>> standard_input();
static ErrorOr<NonnullOwnPtr<File>> standard_output();