mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:47:46 +00:00
AK: Add a canonicalized_path() convenience function.
This is the same as calling FileSystemPath(foo).string(). The majority of clients only care about canonicalizing a path, so let's have an easy way to express that.
This commit is contained in:
parent
cd497accbe
commit
954a0b8efe
7 changed files with 33 additions and 25 deletions
|
@ -19,7 +19,7 @@ public:
|
|||
bool has_extension(StringView) const;
|
||||
|
||||
private:
|
||||
bool canonicalize(bool resolve_symbolic_links = false);
|
||||
void canonicalize();
|
||||
|
||||
Vector<String> m_parts;
|
||||
String m_string;
|
||||
|
@ -27,6 +27,9 @@ private:
|
|||
bool m_is_valid { false };
|
||||
};
|
||||
|
||||
String canonicalized_path(const StringView&);
|
||||
|
||||
};
|
||||
|
||||
using AK::FileSystemPath;
|
||||
using AK::canonicalized_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue