diff options
Diffstat (limited to 'graphs/cpp/path/path_example.cc')
| -rw-r--r-- | graphs/cpp/path/path_example.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/graphs/cpp/path/path_example.cc b/graphs/cpp/path/path_example.cc new file mode 100644 index 0000000..f35c605 --- /dev/null +++ b/graphs/cpp/path/path_example.cc @@ -0,0 +1,22 @@ +#include <iostream> + +#include "unix_path.hh" +#include "windows_path.hh" + +int main() +{ + auto windows_path = WindowsPath('E'); + + std::cout << windows_path.join("Users").join("YAKA").join("cpp").to_string() + << '\n'; /* E:\Users\YAKA\cpp\ */ + + auto unix_path = UnixPath(); + + std::cout << unix_path.join("home").join("yaka").join("cpp").to_string() + << '\n'; // /home/yaka/cpp/ + + std::cout << unix_path.join("main.cc", true).to_string() + << '\n'; // /home/yaka/cpp/main.cc + + return 0; +} |
