MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / readFile

Function readFile

CesiumNativeTests/src/readFile.cpp:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <vector>
10
11std::vector<std::byte> readFile(const std::filesystem::path& fileName) {
12 std::ifstream file(fileName, std::ios::binary | std::ios::ate);
13 REQUIRE(file);
14
15 std::streamoff size = file.tellg();
16 file.seekg(0, std::ios::beg);
17
18 std::vector<std::byte> buffer{size_t(size)};
19 file.read(reinterpret_cast<char*>(buffer.data()), std::streamsize(size));
20
21 return buffer;
22}

Calls 1

dataMethod · 0.45

Tested by 12

rasterizeOverlayTileFunction · 0.68
handleApiServerMethod · 0.68
handleApiServerMethod · 0.68
createMockRequestFunction · 0.68
loadTileContentFunction · 0.68
createMockAssetRequestFunction · 0.68
checkBadUnitCubeFunction · 0.68
checkValidUnitCubeFunction · 0.68
fromB3dmMethod · 0.68
fromPntsMethod · 0.68
fromI3dmMethod · 0.68