From 82a3131e1b84ddc81e61af8cfe8ac8c1a6de12fc Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Sat, 19 Apr 2025 10:25:04 -0500 Subject: [PATCH] Make path api more understandable, breaks certain code and have makeabsolute and makerelative --- examples/pathtest.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/pathtest.cpp diff --git a/examples/pathtest.cpp b/examples/pathtest.cpp new file mode 100644 index 0000000..4b569fc --- /dev/null +++ b/examples/pathtest.cpp @@ -0,0 +1,16 @@ +#include "TessesFramework/Filesystem/VFS.hpp" +#include +#include +using namespace Tesses::Framework::Filesystem; + + +int main(int argc, char** argv) +{ + VFSPath path("C:/home/user/file"); + VFSPath path2("D:/home/user/file"); + VFSPath path3("C:/home/user"); + std::cout << path.MakeRelative(path2).ToString() << std::endl; + + std::cout << (path3 / path.MakeRelative(path2) / "John").CollapseRelativeParents().ToString() << std::endl; + return 0; +} \ No newline at end of file