mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:45:08 +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,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "Project.h"
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
|
@ -169,7 +169,7 @@ private:
|
|||
Project::Project(const String& path, Vector<String>&& filenames)
|
||||
: m_path(path)
|
||||
{
|
||||
m_name = FileSystemPath(m_path).basename();
|
||||
m_name = LexicalPath(m_path).basename();
|
||||
|
||||
m_file_icon = GUI::Icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"));
|
||||
m_cplusplus_icon = GUI::Icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-cplusplus.png"));
|
||||
|
@ -283,7 +283,7 @@ bool Project::save()
|
|||
ProjectFile* Project::get_file(const String& filename)
|
||||
{
|
||||
for (auto& file : m_files) {
|
||||
if (FileSystemPath(file.name()).string() == FileSystemPath(filename).string())
|
||||
if (LexicalPath(file.name()).string() == LexicalPath(filename).string())
|
||||
return &file;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -307,7 +307,7 @@ void Project::rebuild_tree()
|
|||
root->type = ProjectTreeNode::Type::Project;
|
||||
|
||||
for (auto& file : m_files) {
|
||||
FileSystemPath path(file.name());
|
||||
LexicalPath path(file.name());
|
||||
ProjectTreeNode* current = root.ptr();
|
||||
StringBuilder partial_path;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue