summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2023-05-13 01:10:30 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2023-05-14 15:42:57 -0600
commitd5c13a3cbc85b4a21272e0982aec9b3b3d81a33d (patch)
tree13d1ce7d8f28300bd222adbede080bb922293516 /Userland/Libraries/LibCore
parentb65d49669ae91eaec6a4c103763b88f191ba53e7 (diff)
downloadserenity-d5c13a3cbc85b4a21272e0982aec9b3b3d81a33d.zip
LibCore: Remove standard I/O from DeprecatedFile
Diffstat (limited to 'Userland/Libraries/LibCore')
-rw-r--r--Userland/Libraries/LibCore/DeprecatedFile.cpp31
-rw-r--r--Userland/Libraries/LibCore/DeprecatedFile.h4
2 files changed, 0 insertions, 35 deletions
diff --git a/Userland/Libraries/LibCore/DeprecatedFile.cpp b/Userland/Libraries/LibCore/DeprecatedFile.cpp
index 61853b6a28..b69b05747d 100644
--- a/Userland/Libraries/LibCore/DeprecatedFile.cpp
+++ b/Userland/Libraries/LibCore/DeprecatedFile.cpp
@@ -242,37 +242,6 @@ ErrorOr<DeprecatedString> DeprecatedFile::read_link(DeprecatedString const& link
#endif
-static RefPtr<DeprecatedFile> stdin_file;
-static RefPtr<DeprecatedFile> stdout_file;
-static RefPtr<DeprecatedFile> stderr_file;
-
-NonnullRefPtr<DeprecatedFile> DeprecatedFile::standard_input()
-{
- if (!stdin_file) {
- stdin_file = DeprecatedFile::construct();
- stdin_file->open(STDIN_FILENO, OpenMode::ReadOnly, ShouldCloseFileDescriptor::No);
- }
- return *stdin_file;
-}
-
-NonnullRefPtr<DeprecatedFile> DeprecatedFile::standard_output()
-{
- if (!stdout_file) {
- stdout_file = DeprecatedFile::construct();
- stdout_file->open(STDOUT_FILENO, OpenMode::WriteOnly, ShouldCloseFileDescriptor::No);
- }
- return *stdout_file;
-}
-
-NonnullRefPtr<DeprecatedFile> DeprecatedFile::standard_error()
-{
- if (!stderr_file) {
- stderr_file = DeprecatedFile::construct();
- stderr_file->open(STDERR_FILENO, OpenMode::WriteOnly, ShouldCloseFileDescriptor::No);
- }
- return *stderr_file;
-}
-
static DeprecatedString get_duplicate_name(DeprecatedString const& path, int duplicate_count)
{
if (duplicate_count == 0) {
diff --git a/Userland/Libraries/LibCore/DeprecatedFile.h b/Userland/Libraries/LibCore/DeprecatedFile.h
index df4fb8e513..e310e4cf1b 100644
--- a/Userland/Libraries/LibCore/DeprecatedFile.h
+++ b/Userland/Libraries/LibCore/DeprecatedFile.h
@@ -82,10 +82,6 @@ public:
bool open(int fd, OpenMode, ShouldCloseFileDescriptor);
[[nodiscard]] int leak_fd();
- static NonnullRefPtr<DeprecatedFile> standard_input();
- static NonnullRefPtr<DeprecatedFile> standard_output();
- static NonnullRefPtr<DeprecatedFile> standard_error();
-
static Optional<DeprecatedString> resolve_executable_from_environment(StringView filename);
private: