MCPcopy Create free account
hub / github.com/apache/mesos / getBlobPath

Method getBlobPath

src/uri/fetchers/docker.cpp:658–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656
657
658string DockerFetcherPlugin::getBlobPath(
659 const string& directory,
660 const string& blobSum)
661{
662#ifdef __WINDOWS__
663 std::string path = path::join(directory, blobSum);
664
665 // The colon in disk designator is preserved.
666 auto i = 0;
667 if (path::is_absolute(path)) {
668 i = path.find_first_of(':') + 1;
669 }
670
671 for (; i < path.size(); ++i) {
672 if (path[i] == ':') {
673 path[i] = '_';
674 }
675 }
676
677 return path;
678#else
679 return path::join(directory, blobSum);
680#endif
681}
682
683
684DockerFetcherPlugin::DockerFetcherPlugin(

Callers

nothing calls this directly

Calls 3

is_absoluteFunction · 0.85
joinFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected