Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/ntfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/structured_values/file_name.rs')
-rw-r--r--src/structured_values/file_name.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/structured_values/file_name.rs b/src/structured_values/file_name.rs
index 19a1e08..237c923 100644
--- a/src/structured_values/file_name.rs
+++ b/src/structured_values/file_name.rs
@@ -78,6 +78,11 @@ impl NtfsFileName {
NtfsFileAttributeFlags::from_bits_truncate(self.header.file_attributes)
}
+ pub fn is_directory(&self) -> bool {
+ self.file_attributes()
+ .contains(NtfsFileAttributeFlags::IS_DIRECTORY)
+ }
+
pub fn mft_record_modification_time(&self) -> NtfsTime {
self.header.mft_record_modification_time
}
@@ -98,8 +103,7 @@ impl NtfsFileName {
self.header.name_length as usize * mem::size_of::<u16>()
}
- /// Returns the namespace this name belongs to, or [`NtfsError::UnsupportedFileNamespace`]
- /// if it's an unknown namespace.
+ /// Returns the [`NtfsFileNamespace`] of this file name.
pub fn namespace(&self) -> NtfsFileNamespace {
NtfsFileNamespace::n(self.header.namespace).unwrap()
}