mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:27:35 +00:00
AK: Rename FileSystemPath -> LexicalPath
And move canonicalized_path() to a static method on LexicalPath. This is to make it clear that FileSystemPath/canonicalized_path() only perform *lexical* canonicalization.
This commit is contained in:
parent
f746bbda17
commit
602c3fdb3a
44 changed files with 174 additions and 181 deletions
|
@ -25,8 +25,8 @@
|
|||
*/
|
||||
|
||||
#include "Launcher.h"
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
#include <stdio.h>
|
||||
|
@ -191,7 +191,7 @@ Vector<String> Launcher::handlers_for_path(const String& path)
|
|||
if (S_ISDIR(st.st_mode))
|
||||
return { "/bin/FileManager" };
|
||||
|
||||
auto extension = FileSystemPath(path).extension().to_lowercase();
|
||||
auto extension = LexicalPath(path).extension().to_lowercase();
|
||||
|
||||
return handlers_for(extension, m_file_handlers, [](auto& handler, auto& key) {
|
||||
return handler.file_types.contains(key);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "ShutdownDialog.h"
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
|
@ -171,7 +171,7 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
|
|||
while (dt.has_next()) {
|
||||
auto theme_name = dt.next_path();
|
||||
auto theme_path = String::format("/res/themes/%s", theme_name.characters());
|
||||
g_themes.append({ FileSystemPath(theme_name).title(), theme_path });
|
||||
g_themes.append({ LexicalPath(theme_name).title(), theme_path });
|
||||
}
|
||||
quick_sort(g_themes, [](auto& a, auto& b) { return a.name < b.name; });
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "Client.h"
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
|
@ -82,7 +82,7 @@ void Client::handle_request(ByteBuffer raw_request)
|
|||
return;
|
||||
}
|
||||
|
||||
auto requested_path = canonicalized_path(request.resource());
|
||||
auto requested_path = LexicalPath::canonicalized_path(request.resource());
|
||||
dbg() << "Canonical requested path: '" << requested_path << "'";
|
||||
|
||||
StringBuilder path_builder;
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
#include <LibGfx/Font.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue