MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / path_join

Function path_join

deps/GraphBLAS/CUDA/jitify.hpp:380–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378 }
379}
380inline std::string path_join(std::string p1, std::string p2) {
381#ifdef _WIN32
382 char sep = '\\';
383#else
384 char sep = '/';
385#endif
386 if (p1.size() && p2.size() && p2[0] == sep) {
387 throw std::invalid_argument("Cannot join to absolute path");
388 }
389 if (p1.size() && p1[p1.size() - 1] != sep) {
390 p1 += sep;
391 }
392 return p1 + p2;
393}
394// Elides "/." and "/.." tokens from path.
395inline std::string path_simplify(const std::string& path) {
396 std::vector<std::string> dirs;

Callers 2

load_sourceFunction · 0.85
create_moduleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected