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
AgeCommit message (Collapse)Author
2021-07-21Improve error reporting of `NtfsIndexRecord::validate_sizes`Colin Finck
2021-07-21Implement Update Sequence Array parsing and record fixups.Colin Finck
This is where things get dirty. As NTFS requires us to fix up records, we can't continue our previous design of avoiding dynamic allocations and reading everything on demand via `io::Read`. Instead, we now read an entire record (usually not larger than 4 KiB), fix it up, and store it in a `Vec`. This required changes almost everywhere. It should be noted that many non-resident attributes are not part of a record, which is why structured values are now implemented differently depending on the attribute type. On the plus side, many structures need less borrowing now, which makes them more comfortable to use. I have also added missing sanity checks with precise errors where appropriate.
2021-06-29Upgrade dependencies and fix `displaydoc` error messages.Colin Finck
2021-06-23Add `NtfsIndex` and `NtfsIndexEntries` to traverse an index in-order.Colin Finck
This introduces a hard dependency on alloc for a core feature. It is required as long as we don't know the B-tree depth in advance, and need to maintain a stack with elements per layer during traversal.
2021-06-22`NtfsIndexEntries` -> `NtfsIndexNodeEntries`Colin Finck
We reuse the former name for something else in the next commit.
2021-06-05Prefer `i64::try_from` over manual range checksColin Finck
2021-06-05Implement `NtfsIndexAllocation::record_from_vcn` to aid index traversalsColin Finck
2021-06-05Add `Lcn`, `Vcn` to simplify cluster calculations and make them typesafeColin Finck
2021-06-05Pass an `&'n Ntfs` reference to `NewNtfsStructuredValue::new`Colin Finck
This enables all structured values to access filesystem-wide information such as the cluster size, which will soon be needed for `NtfsIndexAllocation`.
2021-06-04Update binread to an official version that supports const_generics.Colin Finck
2021-06-04Add `NtfsIndexAllocation`, iterators for Index Records and Index EntriesColin Finck
This allows iterating through all nodes of an arbitrary index. Tested with a filesystem that has 512 directories in the root. Still lacks functions to traverse an index in-order or find an item efficiently.
2021-06-04Fix reading LCN positions of data runs of non-resident attributes.Colin Finck
The LCN offset of a data run is relative to the previous one. We need to read it as a _signed_ variable-length integer and turn it into an absolute LCN position.
2021-06-04Optimize a common case when seeking non-resident values.Colin Finck
This translates `SeekFrom::Start(n)` into a more efficient `SeekFrom::Current` if n >= self.stream_position. We don't need to traverse data runs from the very beginning then.
2021-06-04Fix seeking non-resident values that have been seeked before.Colin Finck
2021-06-04Make all structured values ready for indexes and non-resident attributesColin Finck
This introduces a `NewNtfsStructuredValue` trait for the `new` function of all structured values. Indexes later need that to return the structured value specified by a type parameter. We also have to pass an explicit length and can't just rely on the end of the passed `NtfsAttributeValue`/`NtfsAttributeValueAttached`. For structured values of non-resident attributes, we have to store an `NtfsAttributeValue` instead of an absolute byte position, in order to let a structured value read additional data (e.g. the name of an `NtfsFileName`). The `NtfsAttributeValue` properly moves between data runs while reading.
2021-06-04Simplify our `stream_position()`. It can't fail and doesn't need `mut`Colin Finck
2021-05-05Implement `NtfsAttributeValue::len` and use it for the structured valuesColin Finck
2021-05-03Implement reading non-resident values, `NtfsIndexRoot`, clusters >64K, and ↵Colin Finck
refactor many affected parts.
2021-05-01Implement `NtfsString::read_from_fs` to simplify several functions.Colin Finck
2021-04-23Fix offset/position misnaming in `NtfsAttributes::next`Colin Finck
2021-04-23Rename `read_structured_value` -> `structured_value`Colin Finck
All functions prefixed with "read" take a buffer to read into, and this is not the case here.
2021-04-21Add `volume_info` and `volume_name` convenience functions to `Ntfs`.Colin Finck
2021-04-21Implement `NtfsVolumeInformation` and `NtfsVolumeName` structured valuesColin Finck
2021-04-21Implement the `NtfsObjectId` structured value along with `NtfsGuid`.Colin Finck
2021-04-21Move attribute tests to their corresponding structured values and improve them.Colin Finck
2021-04-21Improve interface of `NtfsFile`Colin Finck
2021-04-20Initial implementation of an NTFS filesystem crate, with access to NTFS ↵Colin Finck
files, resident attributes, StandardInformation and FileName structures, string and time parsing, with real filesystem tests for all of that.