MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / TryCreate

Method TryCreate

Tools/MappedFile.cpp:57–62  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

55
56 //-------------------------------------------------------------------------
57 std::unique_ptr<MappedFile> MappedFile::TryCreate(const std::filesystem::path& path)
58 {
59 if (!FileExists(path) || std::filesystem::file_size(path) == 0)
60 return nullptr;
61 return std::unique_ptr<MappedFile>(new MappedFile{ path });
62 }
63}

Callers

nothing calls this directly

Calls 1

FileExistsFunction · 0.85

Tested by

no test coverage detected