MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / readConfigFile

Function readConfigFile

Examples/AwaitConfigReload/AwaitConfigReload.cpp:30–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28};
29
30static AwaitTask readConfigFile(AwaitEventLoop& await, ThreadPool& threadPool, ConfigLoadJob& job)
31{
32 SC_CO_TRY(co_await await.fsOpen(threadPool, job.path, FileOpen::Read, job.file));
33 SC_CO_TRY(co_await await.fsRead(threadPool, job.file, {job.buffer, sizeof(job.buffer)}, job.result));
34 SC_CO_TRY(co_await await.fsClose(threadPool, job.file));
35
36 co_return Result(true);
37}
38
39static AwaitTask reloadConfig(AwaitEventLoop& await, ThreadPool& threadPool, ConfigLoadJob& job)
40{

Callers 1

reloadConfigFunction · 0.85

Calls 4

fsOpenMethod · 0.80
fsReadMethod · 0.80
fsCloseMethod · 0.80
ResultClass · 0.50

Tested by

no test coverage detected