nicholasbishop / ext4-view-rs

Rust library for reading ext2/ext4 filesystems
https://crates.io/crates/ext4-view
Apache License 2.0
8 stars 2 forks source link

resolve: Add resolve_path #130

Closed nicholasbishop closed 3 months ago

nicholasbishop commented 3 months ago

This will replace the simple path resolver in path_to_inode in a later commit. It will also be used to implement a canonicalize method (see https://doc.rust-lang.org/std/fs/fn.canonicalize.html).

The implementation is a bit hairy, and it's certainly not the most efficient implementation imaginable. However, it is pretty well covered by unit tests and it has some guards against unforeseen bugs.

See the docstring for details.