readlink: Prefer FileSystem::readlink over DeprecatedFile

This commit is contained in:
Ben Wiederhake 2023-05-12 23:31:49 +02:00 committed by Andreas Kling
parent b7558a5ce4
commit 317cdc32ad
Notes: sideshowbarker 2024-07-17 21:16:31 +09:00
2 changed files with 3 additions and 2 deletions

View file

@ -125,6 +125,7 @@ target_link_libraries(pgrep PRIVATE LibRegex)
target_link_libraries(pkill PRIVATE LibRegex) target_link_libraries(pkill PRIVATE LibRegex)
target_link_libraries(pls PRIVATE LibCrypt) target_link_libraries(pls PRIVATE LibCrypt)
target_link_libraries(pro PRIVATE LibFileSystem LibProtocol LibHTTP) target_link_libraries(pro PRIVATE LibFileSystem LibProtocol LibHTTP)
target_link_libraries(readlink PRIVATE LibFileSystem)
target_link_libraries(run-tests PRIVATE LibCoredump LibDebug LibFileSystem LibRegex) target_link_libraries(run-tests PRIVATE LibCoredump LibDebug LibFileSystem LibRegex)
target_link_libraries(rm PRIVATE LibFileSystem) target_link_libraries(rm PRIVATE LibFileSystem)
target_link_libraries(sed PRIVATE LibRegex LibFileSystem) target_link_libraries(sed PRIVATE LibRegex LibFileSystem)

View file

@ -5,8 +5,8 @@
*/ */
#include <LibCore/ArgsParser.h> #include <LibCore/ArgsParser.h>
#include <LibCore/DeprecatedFile.h>
#include <LibCore/System.h> #include <LibCore/System.h>
#include <LibFileSystem/FileSystem.h>
#include <LibMain/Main.h> #include <LibMain/Main.h>
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
@ -22,7 +22,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.parse(arguments); args_parser.parse(arguments);
for (auto path : paths) { for (auto path : paths) {
auto destination = TRY(Core::DeprecatedFile::read_link(path)); auto destination = TRY(FileSystem::read_link(path));
out("{}", destination); out("{}", destination);
if (!no_newline) if (!no_newline)
outln(); outln();