(
writer: &mut W,
path: &str,
meta: &PerroAssetsEntryMeta,
)
| 90 | io::ErrorKind::InvalidData, |
| 91 | format!("Unsupported PerroAssets entry flags {flags:#x}"), |
| 92 | )); |
| 93 | } |
| 94 | |
| 95 | Ok(( |
| 96 | path, |
| 97 | PerroAssetsEntryMeta { |
| 98 | offset, |
| 99 | size, |
| 100 | original_size, |
| 101 | flags, |
| 102 | }, |
| 103 | )) |
| 104 | } |
| 105 | |
| 106 | pub fn write_index_entry<W: Write>( |
| 107 | writer: &mut W, |
| 108 | path: &str, |
| 109 | meta: &PerroAssetsEntryMeta, |
| 110 | ) -> io::Result<()> { |
| 111 | let path_bytes = path.as_bytes(); |
| 112 | if path_bytes.len() > u16::MAX as usize { |
| 113 | return Err(io::Error::new(io::ErrorKind::InvalidInput, "Path too long")); |
no test coverage detected