MCPcopy Create free account
hub / github.com/Sigil-Ebook/Sigil / GetRelativePathFromResource

Method GetRelativePathFromResource

src/ResourceObjects/Resource.cpp:94–99  ·  view source on GitHub ↗

Use to generate relative path **from** some **other** start_resource (OPFResource, NCXResource, NavResource, etc) "to" **this** resource

Source from the content-addressed store, hash-verified

92// Use to generate relative path **from** some **other** start_resource
93// (OPFResource, NCXResource, NavResource, etc) "to" **this** resource
94QString Resource::GetRelativePathFromResource(const Resource* start_resource) const
95{
96 if (GetRelativePath() == start_resource->GetRelativePath()) return "";
97 // return Utility::relativePath(GetRelativePath(), start_resource->GetFolder());
98 return Utility::relativePath(m_FullFilePath, start_resource->GetFullFolderPath());
99}
100
101
102// Use to generate relative path from **this** resource to some **other** dest_resource

Callers 4

WriteFallbackNavPointMethod · 0.80
AddCoverMethod · 0.80
foreachFunction · 0.80
foreachFunction · 0.80

Calls 3

relativePathFunction · 0.85
GetRelativePathMethod · 0.80
GetFullFolderPathMethod · 0.80

Tested by

no test coverage detected