summaryrefslogtreecommitdiff
path: root/graphs/cpp/path/path_example.cc
blob: f35c605446907cd9df49bab2148f8f5b7b333cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}