mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
Add a simple FileSystemPath class that can canonicalize paths.
Also a simple StringBuilder to help him out.
This commit is contained in:
parent
43475f248b
commit
88ad59bfb1
6 changed files with 102 additions and 6 deletions
24
AK/FileSystemPath.h
Normal file
24
AK/FileSystemPath.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include "String.h"
|
||||
|
||||
namespace AK {
|
||||
|
||||
class FileSystemPath {
|
||||
public:
|
||||
FileSystemPath() { }
|
||||
explicit FileSystemPath(const String&);
|
||||
|
||||
bool isValid() const { return m_isValid; }
|
||||
String string() const { return m_string; }
|
||||
|
||||
private:
|
||||
bool canonicalize(bool resolveSymbolicLinks = false);
|
||||
|
||||
String m_string;
|
||||
bool m_isValid { false };
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
using AK::FileSystemPath;
|
Loading…
Add table
Add a link
Reference in a new issue