hcabel / OpenVoxel

OpenVoxel is a Open source voxel game engine/editor
GNU General Public License v3.0
15 stars 2 forks source link

hcabel/make all path a path #80

Closed hcabel closed 1 year ago

hcabel commented 1 year ago

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.