serenity/AK/FileSystemPath.h

31 lines
571 B
C
Raw Normal View History

#pragma once
#include "AKString.h"
namespace AK {
class FileSystemPath {
public:
FileSystemPath() { }
explicit FileSystemPath(const String&);
2018-12-03 00:38:22 +00:00
bool is_valid() const { return m_is_valid; }
String string() const { return m_string; }
String basename() const { return m_basename; }
const Vector<String>& parts() const { return m_parts; }
private:
2018-12-03 00:38:22 +00:00
bool canonicalize(bool resolve_symbolic_links = false);
Vector<String> m_parts;
String m_string;
String m_basename;
2018-12-03 00:38:22 +00:00
bool m_is_valid { false };
};
};
using AK::FileSystemPath;