summaryrefslogtreecommitdiff
path: root/Userland/Utilities/touch.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-12-07 21:34:00 +0100
committerSam Atkins <atkinssj@gmail.com>2022-12-08 12:52:14 +0000
commit2fc2025f49bb974a46afdf2242489ab0fe5a5cba (patch)
treee7565af2a4b432991c70180b9a7e7f90b2dc3e0b /Userland/Utilities/touch.cpp
parentbd272e638cc33e3282ffde1052eafd15cd00eac5 (diff)
downloadserenity-2fc2025f49bb974a46afdf2242489ab0fe5a5cba.zip
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.
Diffstat (limited to 'Userland/Utilities/touch.cpp')
-rw-r--r--Userland/Utilities/touch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/touch.cpp b/Userland/Utilities/touch.cpp
index 40ed302e44..3f4c654720 100644
--- a/Userland/Utilities/touch.cpp
+++ b/Userland/Utilities/touch.cpp
@@ -9,7 +9,7 @@
#include <AK/GenericLexer.h>
#include <AK/Time.h>
#include <LibCore/ArgsParser.h>
-#include <LibCore/Stream.h>
+#include <LibCore/File.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
#include <LibTimeZone/TimeZone.h>
@@ -239,7 +239,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
atime.tv_nsec = UTIME_OMIT;
for (auto path : paths) {
- if (Core::Stream::File::exists(path)) {
+ if (Core::File::exists(path)) {
if (utimensat(AT_FDCWD, path.characters(), times, 0) == -1)
err("failed to touch '{}': {}", path, strerror(errno));
} else if (!no_create_file) {