MCPcopy Create free account
hub / github.com/defold/defold / GetDescriptor

Function GetDescriptor

engine/resource/src/resource.cpp:1391–1398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1389}
1390
1391Result GetDescriptor(HFactory factory, const char* name, HResourceDescriptor* descriptor)
1392{
1393 char canonical_path[RESOURCE_PATH_MAX];
1394 GetCanonicalPath(name, canonical_path, sizeof(canonical_path));
1395
1396 uint64_t canonical_path_hash = dmHashBuffer64(canonical_path, strlen(canonical_path));
1397 return GetDescriptorByHash(factory, canonical_path_hash, descriptor);
1398}
1399
1400Result GetDescriptorWithExt(HFactory factory, uint64_t hashed_name, const uint64_t* exts, uint32_t ext_count, HResourceDescriptor* descriptor)
1401{

Callers 3

JobCallbackFunction · 0.70
ResourceGetDescriptorFunction · 0.70
TEST_PFunction · 0.50

Calls 3

GetCanonicalPathFunction · 0.85
GetDescriptorByHashFunction · 0.85
dmHashBuffer64Function · 0.50

Tested by 1

TEST_PFunction · 0.40