Skip to content

Commit 96da0e7

Browse files
committed
Updated documentation
1 parent 4b045b0 commit 96da0e7

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

docs/Doxyfile.in

+1
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ WARN_LOGFILE =
794794
INPUT = @CMAKE_SOURCE_DIR@/include/skyr/config.hpp \
795795
@CMAKE_SOURCE_DIR@/include/skyr/domain.hpp \
796796
@CMAKE_SOURCE_DIR@/include/skyr/expected.hpp \
797+
@CMAKE_SOURCE_DIR@/include/skyr/filesystem.hpp \
797798
@CMAKE_SOURCE_DIR@/include/skyr/ipv4_address.hpp \
798799
@CMAKE_SOURCE_DIR@/include/skyr/ipv6_address.hpp \
799800
@CMAKE_SOURCE_DIR@/include/skyr/optional.hpp \

docs/filesystem.rst

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
`std::filesystem::path`
2+
======================
3+
4+
.. doxygennamespace:: skyr::filesystem
5+
6+
.. doxygenfunction:: skyr::filesystem::from_path
7+
8+
.. doxygenfunction:: skyr::filesystem::to_path
9+
10+
.. doxygenenum:: skyr::filesystem::path_errc

docs/unicode.rst

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
Unicode encoding
22
================
33

4-
.. doxygenfunction:: skyr::wstring_to_bytes
4+
.. doxygennamespace:: skyr::unicode
55

6-
.. doxygenfunction:: skyr::wstring_from_bytes
6+
.. doxygenfunction:: skyr::unicode::wstring_to_bytes
77

8-
.. doxygenfunction:: skyr::utf16_to_bytes
8+
.. doxygenfunction:: skyr::unicode::wstring_from_bytes
99

10-
.. doxygenfunction:: skyr::utf16_from_bytes
10+
.. doxygenfunction:: skyr::unicode::utf16_to_bytes
1111

12-
.. doxygenfunction:: skyr::utf32_to_bytes
12+
.. doxygenfunction:: skyr::unicode::utf16_from_bytes
1313

14-
.. doxygenfunction:: skyr::utf32_from_bytes
14+
.. doxygenfunction:: skyr::unicode::utf32_to_bytes
1515

16-
.. doxygenenum:: skyr::unicode_errc
16+
.. doxygenfunction:: skyr::unicode::utf32_from_bytes
17+
18+
.. doxygenenum:: skyr::unicode::unicode_errc

include/skyr/filesystem.hpp

+13
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,29 @@
1212
#include <skyr/url.hpp>
1313

1414
namespace skyr {
15+
/// \namespace filesystem
16+
/// Contains functions to convert from filesystem path to URLs and
17+
/// vice versa
1518
namespace filesystem {
1619
enum class path_errc {
1720
invalid_path=1,
1821
percent_decoding_error=2,
1922
};
2023

24+
/// Creates a `std::error_code` given a `skyr::path_errc` value
25+
/// \param error A filesystem path conversion error
26+
/// \returns A `std::error_code` object
2127
std::error_code make_error_code(path_errc error);
2228

29+
/// Converts a path object to a URL with a file protocol. Handles
30+
/// some processing, including percent encoding
31+
/// \param path A filesystem path
32+
/// \returns a url object or an error on failure
2333
expected<url, std::error_code> from_path(const std::filesystem::path &path);
2434

35+
/// Converts a URL pathname to a filesystem path
36+
/// \param input A url object
37+
/// \returns a path object or an error on failure
2538
expected<std::filesystem::path, std::error_code> to_path(const url &input);
2639
} // namespace filesystem
2740
} // namespace skyr

0 commit comments

Comments
 (0)