MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / ReadFileShared

Method ReadFileShared

ui/Services/Patching/Patcher.cs:99–106  ·  view source on GitHub ↗
(string path)

Source from the content-addressed store, hash-verified

97 }
98
99 static byte[] ReadFileShared(string path)
100 {
101 // FileShare.Read: avoid TOCTOU with concurrent SteamTools writes.
102 using var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
103 var buf = new byte[fs.Length];
104 fs.ReadExactly(buf);
105 return buf;
106 }
107
108 byte[] GetDecryptedPayload(string cachePath)
109 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected