MCPcopy Create free account
hub / github.com/crownengine/crown / map_source_dir

Method map_source_dir

src/resource/data_compiler.cpp:738–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738s32 DataCompiler::map_source_dir(const char *name, const char *source_dir)
739{
740 TempAllocator256 ta;
741 DynamicString sname(ta);
742 DynamicString sdir(ta);
743
744 Stat st;
745 os::stat(st, source_dir);
746 if (st.file_type != Stat::DIRECTORY)
747 return -1;
748
749 sname.set(name, strlen32(name));
750 sdir.set(source_dir, strlen32(source_dir));
751 hash_map::set(_source_dirs, sname, sdir);
752 return 0;
753}
754
755void DataCompiler::source_dir(const char *resource_name, DynamicString &source_dir)
756{

Callers 1

main_data_compilerFunction · 0.80

Calls 3

setClass · 0.85
statFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected