summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/File.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-20 11:16:42 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-20 15:31:46 +0200
commit13f4890c38c9f7f7d6e936d56de550a36916eec2 (patch)
tree69d94dc0c75984072623a0da09b7637027d7bcb9 /Userland/Libraries/LibCore/File.h
parent1474a537b630ef1b6b638164bca9043f0622d617 (diff)
downloadserenity-13f4890c38c9f7f7d6e936d56de550a36916eec2.zip
LibCore: Make Core::File::open() return OSError in case of failure
Diffstat (limited to 'Userland/Libraries/LibCore/File.h')
-rw-r--r--Userland/Libraries/LibCore/File.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCore/File.h b/Userland/Libraries/LibCore/File.h
index c430d1eade..30be3aa333 100644
--- a/Userland/Libraries/LibCore/File.h
+++ b/Userland/Libraries/LibCore/File.h
@@ -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); }