MCPcopy Create free account
hub / github.com/PerroEngine/Perro / get_file_bytes

Function get_file_bytes

perro_source/api_modules/perro_steamworks/src/cloud.rs:53–64  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

51}
52
53pub fn get_file_bytes(name: &str) -> Result<Vec<u8>, SteamError> {
54 app::with_client(|client| {
55 let mut out = Vec::new();
56 client
57 .remote_storage()
58 .file(name)
59 .read()
60 .read_to_end(&mut out)
61 .map_err(|_| SteamError::CallFailed("remote_storage.read"))?;
62 Ok(out)
63 })
64}
65
66pub fn write(name: &str, bytes: &[u8]) -> Result<(), SteamError> {
67 app::with_client(|client| {

Callers

nothing calls this directly

Calls 3

with_clientFunction · 0.85
fileMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected