summaryrefslogtreecommitdiffstatshomepage
path: root/include/winapi/path.hpp
blob: 3ea66c6636daf18a043ceb38ed618617a5fd086e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2020 Egor Tensin <egor@tensin.name>
// This file is part of the "winapi-common" project.
// For details, see https://github.com/egor-tensin/winapi-common
// Distributed under the MIT License.

#pragma once

#include <string>

namespace winapi {

/** @brief Absolute, canonical path. */
class CanonicalPath {
public:
    /** Make an absolute, canonical path. */
    static std::string canonicalize(std::string_view);

    explicit CanonicalPath(std::string_view);

    std::string get() const {
        return m_path;
    }

    std::string path() const {
        return get();
    }

private:
    std::string m_path;
};

} // namespace winapi