(name: &str)
| 51 | } |
| 52 | |
| 53 | pub 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 | |
| 66 | pub fn write(name: &str, bytes: &[u8]) -> Result<(), SteamError> { |
| 67 | app::with_client(|client| { |
nothing calls this directly
no test coverage detected