Extract the content of a file inside the phar.
(&self, internal_path: &str)
| 133 | |
| 134 | /// Extract the content of a file inside the phar. |
| 135 | pub fn read_file(&self, internal_path: &str) -> Option<&[u8]> { |
| 136 | let &(offset, size) = self.files.get(internal_path)?; |
| 137 | self.data.get(offset..offset + size) |
| 138 | } |
| 139 | |
| 140 | /// Iterate over all file paths in the archive. |
| 141 | pub fn file_paths(&self) -> impl Iterator<Item = &str> { |
no test coverage detected