BarinkOS/source/kernel/vfs/Path.h
Nigel 94a2de3847 Started on path resolution algorithm
- The algorithm will work once I am of better mind to deal with
raw C strings
- The resolution should look at each entry divided by '/'.
  if the entry is not there then we can quit early, however for
now I am mostly concerned with getting the names of directory entries
we would need to look for.
2023-02-19 22:17:56 +01:00

47 lines
653 B
C++

//
// Created by nigel on 19/02/23.
//
#pragma once
#include <stddef.h>
class String {
public:
String(char* characters);
String(String&) = default;
unsigned int length();
char* str ();
char operator[](size_t index) ;
const char operator[](size_t idx) const;
protected:
char* chars;
};
class StringView : String {
public:
StringView(String& string, unsigned int start, unsigned int end );
char* str ();
private:
unsigned int begin;
unsigned int end;
};
class Path{
public:
Path(String& path);
Path(char* path);
StringView getbasename();
char* str();
private:
String path;
};