| 753 | } |
| 754 | |
| 755 | BOOST_FILESYSTEM_DECL path_algorithms::substring path_algorithms::find_relative_path(path const& p) |
| 756 | { |
| 757 | size_type root_name_size = 0; |
| 758 | size_type root_dir_pos = find_root_directory_start(p.m_pathname.c_str(), p.m_pathname.size(), root_name_size); |
| 759 | |
| 760 | // Skip root name, root directory and any duplicate separators |
| 761 | size_type size = root_name_size; |
| 762 | if (root_dir_pos < p.m_pathname.size()) |
| 763 | { |
| 764 | size = root_dir_pos + 1; |
| 765 | |
| 766 | for (size_type n = p.m_pathname.size(); size < n; ++size) |
| 767 | { |
| 768 | if (!detail::is_directory_separator(p.m_pathname[size])) |
| 769 | break; |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | substring rel_path; |
| 774 | rel_path.pos = size; |
| 775 | rel_path.size = p.m_pathname.size() - size; |
| 776 | |
| 777 | return rel_path; |
| 778 | } |
| 779 | |
| 780 | BOOST_FILESYSTEM_DECL path_algorithms::string_type::size_type path_algorithms::find_parent_path_size(path const& p) |
| 781 | { |
nothing calls this directly
no test coverage detected