diff options
Diffstat (limited to 'src/attribute.rs')
-rw-r--r-- | src/attribute.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/attribute.rs b/src/attribute.rs index 42762a1..a7a1fc1 100644 --- a/src/attribute.rs +++ b/src/attribute.rs @@ -292,6 +292,19 @@ impl<'n, 'f> NtfsAttribute<'n, 'f> { LittleEndian::read_u16(&self.file.record_data()[start..]) } + pub fn structured_value<T, S>(&self, fs: &mut T) -> Result<S> + where + T: Read + Seek, + S: NtfsStructuredValueFromSlice<'f> + + NtfsStructuredValueFromNonResidentAttributeValue<'n, 'f>, + { + if self.is_resident() { + self.resident_structured_value() + } else { + self.non_resident_structured_value(fs) + } + } + /// Returns the type of this NTFS attribute, or [`NtfsError::UnsupportedAttributeType`] /// if it's an unknown type. pub fn ty(&self) -> Result<NtfsAttributeType> { |