So I created a Path class that store a path a segment ("A/B/Image.png" will become ["A", "B", "Image.png"])
I call the last segment the target (if pointing to an actual file with extension)
I store has an array to make delimiter easy to swap, I use the GetPath() accessor has much has I can because it will the os delimiter ('\' for windows and '/' for the other), but you can use any delimiter using the GetPath('[AnyChar]') function.
Segment management are also pretty useful when it's come to weird folder name like spaces and stuff.
So try to use the segment manipulation has much has possible.
So I created a Path class that store a path a segment ("A/B/Image.png" will become ["A", "B", "Image.png"]) I call the last segment the target (if pointing to an actual file with extension) I store has an array to make delimiter easy to swap, I use the GetPath() accessor has much has I can because it will the os delimiter ('\' for windows and '/' for the other), but you can use any delimiter using the GetPath('[AnyChar]') function. Segment management are also pretty useful when it's come to weird folder name like spaces and stuff. So try to use the segment manipulation has much has possible.