MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / AddStaticContent

Function AddStaticContent

Source/SysOSX/Debug/WebDebug.cpp:393–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393static void AddStaticContent(const char * dir, const char * root)
394{
395 IO::FindHandleT find_handle;
396 IO::FindDataT find_data;
397
398 if (IO::FindFileOpen(dir, &find_handle, find_data))
399 {
400 do
401 {
402 IO::Filename full_path;
403 IO::Path::Combine(full_path, dir, find_data.Name);
404
405 std::string resource_path = root;
406 resource_path += '/';
407 resource_path += find_data.Name;
408
409 if (IO::Directory::IsDirectory(full_path))
410 {
411 AddStaticContent(full_path, resource_path.c_str());
412 }
413 else if (IO::File::Exists(full_path))
414 {
415 StaticResource resource;
416 resource.Resource = resource_path;
417 resource.FullPath = full_path;
418
419 DBGConsole_Msg(0, " adding [M%s] -> [C%s]",
420 resource.Resource.c_str(), resource.FullPath.c_str());
421
422 gStaticResources.push_back(resource);
423 }
424 }
425 while (IO::FindFileNext(find_handle, find_data));
426
427 IO::FindFileClose(find_handle);
428 }
429}
430
431bool WebDebug_Init()
432{

Callers 1

WebDebug_InitFunction · 0.85

Calls 7

FindFileOpenFunction · 0.50
CombineFunction · 0.50
IsDirectoryFunction · 0.50
ExistsFunction · 0.50
FindFileNextFunction · 0.50
FindFileCloseFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected