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

LibCore: Make Core::File::open() return OSError in case of failure

This commit is contained in:
Andreas Kling 2021-08-20 11:16:42 +02:00
parent 1474a537b6
commit 13f4890c38
8 changed files with 15 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -19,7 +19,7 @@ class File final : public IODevice {
public:
virtual ~File() override;
static Result<NonnullRefPtr<File>, String> open(String filename, OpenMode, mode_t = 0644);
static Result<NonnullRefPtr<File>, OSError> open(String filename, OpenMode, mode_t = 0644);
String filename() const { return m_filename; }
void set_filename(const String filename) { m_filename = move(filename); }