diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-02-08 21:08:01 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-13 00:50:07 +0000 |
commit | d43a7eae545cd699f301471bd0f82399174339c1 (patch) | |
tree | c0a55f768f845041c3aebed3f126d462155a799f /Userland/Utilities/ls.cpp | |
parent | 14951b92ca6160664ccb68c5e1b2d40133763e5f (diff) | |
download | serenity-d43a7eae545cd699f301471bd0f82399174339c1.zip |
LibCore: Rename `File` to `DeprecatedFile`
As usual, this removes many unused includes and moves used includes
further down the chain.
Diffstat (limited to 'Userland/Utilities/ls.cpp')
-rw-r--r-- | Userland/Utilities/ls.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp index 109ea0edb7..b41aec19d1 100644 --- a/Userland/Utilities/ls.cpp +++ b/Userland/Utilities/ls.cpp @@ -15,8 +15,8 @@ #include <AK/Vector.h> #include <LibCore/ArgsParser.h> #include <LibCore/DateTime.h> +#include <LibCore/DeprecatedFile.h> #include <LibCore/DirIterator.h> -#include <LibCore/File.h> #include <LibCore/System.h> #include <LibMain/Main.h> #include <ctype.h> @@ -164,7 +164,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) for (size_t i = 0; i < files.size(); i++) { auto path = files[i].name; - if (flag_recursive && Core::File::is_directory(path)) { + if (flag_recursive && Core::DeprecatedFile::is_directory(path)) { size_t subdirs = 0; Core::DirIterator di(path, Core::DirIterator::SkipParentAndBaseDir); @@ -175,7 +175,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) while (di.has_next()) { DeprecatedString directory = di.next_full_path(); - if (Core::File::is_directory(directory) && !Core::File::is_link(directory)) { + if (Core::DeprecatedFile::is_directory(directory) && !Core::DeprecatedFile::is_link(directory)) { ++subdirs; FileMetadata new_file; new_file.name = move(directory); @@ -184,7 +184,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) } } - bool show_dir_separator = files.size() > 1 && Core::File::is_directory(path) && !flag_list_directories_only; + bool show_dir_separator = files.size() > 1 && Core::DeprecatedFile::is_directory(path) && !flag_list_directories_only; if (show_dir_separator) { printf("%s:\n", path.characters()); } @@ -237,7 +237,7 @@ static DeprecatedString& hostname() static size_t print_name(const struct stat& st, DeprecatedString const& name, char const* path_for_link_resolution, char const* path_for_hyperlink) { if (!flag_disable_hyperlinks) { - auto full_path = Core::File::real_path_for(path_for_hyperlink); + auto full_path = Core::DeprecatedFile::real_path_for(path_for_hyperlink); if (!full_path.is_null()) { auto url = URL::create_with_file_scheme(full_path, {}, hostname()); out("\033]8;;{}\033\\", url.serialize()); @@ -274,7 +274,7 @@ static size_t print_name(const struct stat& st, DeprecatedString const& name, ch } if (S_ISLNK(st.st_mode)) { if (path_for_link_resolution) { - auto link_destination_or_error = Core::File::read_link(path_for_link_resolution); + auto link_destination_or_error = Core::DeprecatedFile::read_link(path_for_link_resolution); if (link_destination_or_error.is_error()) { perror("readlink"); } else { |