Parses the content of the $UpCase MFT entry and stores it in memory. # Parameters - `upcase_entry`: Raw content of the $UpCase MFT entry.
(upcase_entry: &Vec<u8>)
| 207 | /// # Parameters |
| 208 | /// - `upcase_entry`: Raw content of the $UpCase MFT entry. |
| 209 | unsafe fn parse_upcase(upcase_entry: &Vec<u8>) |
| 210 | { |
| 211 | let contents = get_file_content(upcase_entry); |
| 212 | if contents.is_none() { |
| 213 | panic!("{}", &lc!("[x] Critical error: $UpCase parsing failed.")); // There is no point in continuing the execution from here |
| 214 | } |
| 215 | |
| 216 | let mut upcase_lock = UPCASE.write().unwrap(); |
| 217 | let mut upcase_content = contents.unwrap(); |
| 218 | let upcase_content_len = upcase_content.len() / 2; // utf16 |
| 219 | let ptr = upcase_content.as_mut_ptr() as *mut u16; |
| 220 | for i in 0..upcase_content_len { |
| 221 | let item = *(ptr.add(i as usize)); |
| 222 | upcase_lock.push(item); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /// Extracts the data run list of the non-resident unnamed $DATA attribute from an MFT entry. |
| 227 | /// The returned list is **not** sorted by first VCN. |
no test coverage detected