MCPcopy Create free account
hub / github.com/Samsung/UTopia / addFile

Method addFile

tests/testutil/SourceFileManager.cpp:21–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool SourceFileManager::addFile(std::string Path) {
22 auto AbsolutePath = fs::absolute(Path);
23 if (AbsolutePath.string().find(BaseDir) != 0)
24 return false;
25 auto FileName = AbsolutePath.filename();
26 auto Result = ManagedFiles.emplace(FileName, AbsolutePath);
27 return Result.second;
28}
29
30bool SourceFileManager::createFile(std::string Name, std::string Content) {
31 auto Path = fs::path(getSrcDirPath()) / Name;

Callers 1

createLoaderMethod · 0.80

Calls 1

findMethod · 0.45

Tested by 1

createLoaderMethod · 0.64