MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / FindInFile

Function FindInFile

src/OSTPlatform/Windows/ByteSearch.cpp:84–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84std::optional<uint64_t> FindInFile(
85 const std::filesystem::path& path,
86 std::span<const uint8_t> pattern,
87 size_t chunkBytes) {
88 // A whole-file scan is just a range scan over [0, EOF). FindInFileRange clamps
89 // the requested size to the real file size, so a max sentinel means "to the end
90 // of the file" — this routes the legacy path through the same overlapped
91 // double-buffered engine (read of chunk i+1 overlaps the BMH scan of chunk i)
92 // and keeps a single I/O implementation.
93 return FindInFileRange(
94 path, 0, (std::numeric_limits<uint64_t>::max)(), pattern, chunkBytes);
95}
96
97std::optional<uint64_t> FindInFileRange(
98 const std::filesystem::path& path,

Callers 1

TryLegacySectionStringFunction · 0.85

Calls 1

FindInFileRangeFunction · 0.85

Tested by

no test coverage detected