OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
PathResolver.cpp File Reference

PathResolver implementation — see PathResolver.hpp. More...

#include "PathResolver.hpp"
#include "FileIO.hpp"
#include <algorithm>
#include <cctype>
#include <filesystem>
#include <string>
#include <string_view>
Include dependency graph for PathResolver.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::io
 

Functions

bool openswmm::io::isAbsolutePath (const std::string &path) noexcept
 Recognize platform-neutral absolute-looking path syntax.
 
std::string openswmm::io::normaliseSeparators (const std::string &path)
 Normalize separator and dot spelling without resolving parent segments.
 
std::string openswmm::io::parentDir (const std::string &file_path)
 Extract a directory token using normalized separator text.
 
std::string openswmm::io::resolveRelative (const std::string &stored_token, const std::string &anchor_dir)
 Join a stored token to a directory anchor using lexical normalization.
 
RelativeResult openswmm::io::makeRelative (const std::string &target_absolute, const std::string &anchor_dir, int max_up_levels=16)
 Compute a lexical relative token or return a classified absolute fallback.
 

Detailed Description

PathResolver implementation — see PathResolver.hpp.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0