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/ntfs.rs')
-rw-r--r--src/ntfs.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ntfs.rs b/src/ntfs.rs
index ee2f7fc..e1fcb0e 100644
--- a/src/ntfs.rs
+++ b/src/ntfs.rs
@@ -4,7 +4,7 @@
use crate::attribute::NtfsAttributeType;
use crate::boot_sector::BootSector;
use crate::error::{NtfsError, Result};
-use crate::ntfs_file::{KnownNtfsFile, NtfsFile};
+use crate::file::{KnownNtfsFile, NtfsFile};
use crate::structured_values::{NtfsVolumeInformation, NtfsVolumeName};
use crate::upcase_table::UpcaseTable;
use binread::io::{Read, Seek, SeekFrom};
@@ -66,10 +66,6 @@ impl Ntfs {
self.cluster_size
}
- pub fn file_record_size(&self) -> u32 {
- self.file_record_size
- }
-
/// Returns the [`NtfsFile`] for the `n`-th NTFS file record.
///
/// The first few NTFS files have fixed indexes and contain filesystem
@@ -79,7 +75,7 @@ impl Ntfs {
/// - Check if `n` can be u32 instead of u64.
/// - Check if `n` should be in a newtype, with easier conversion from
/// KnownNtfsFile.
- pub fn ntfs_file<'n, T>(&'n self, fs: &mut T, n: u64) -> Result<NtfsFile<'n>>
+ pub fn file<'n, T>(&'n self, fs: &mut T, n: u64) -> Result<NtfsFile<'n>>
where
T: Read + Seek,
{
@@ -93,6 +89,10 @@ impl Ntfs {
NtfsFile::new(&self, fs, position)
}
+ pub fn file_record_size(&self) -> u32 {
+ self.file_record_size
+ }
+
/// Reads the $UpCase file from the filesystem and stores it in this [`Ntfs`] object.
///
/// This function only needs to be called if case-insensitive comparisons are later performed
@@ -143,7 +143,7 @@ impl Ntfs {
where
T: Read + Seek,
{
- let volume_file = self.ntfs_file(fs, KnownNtfsFile::Volume as u64)?;
+ let volume_file = self.file(fs, KnownNtfsFile::Volume as u64)?;
let attribute = volume_file
.attributes()
.find(|attribute| {
@@ -168,7 +168,7 @@ impl Ntfs {
where
T: Read + Seek,
{
- let volume_file = iter_try!(self.ntfs_file(fs, KnownNtfsFile::Volume as u64));
+ let volume_file = iter_try!(self.file(fs, KnownNtfsFile::Volume as u64));
let attribute = volume_file.attributes().find(|attribute| {
// TODO: Replace by attribute.ty().contains() once https://github.com/rust-lang/rust/issues/62358 has landed.
attribute