Crate ext4 [−] [src]
This crate can load ext4 filesystems, letting you read metadata and files from them.
Example
let mut block_device = std::io::BufReader::new(std::fs::File::open("/dev/sda1").unwrap()); let mut superblock = ext4::SuperBlock::new(&mut block_device).unwrap(); let target_inode_number = superblock.resolve_path("/etc/passwd").unwrap().inode; let inode = superblock.load_inode(target_inode_number).unwrap(); let passwd_reader = superblock.open(&inode).unwrap();
Note: normal users can't read /dev/sda1 by default, as it would allow them to read any
file on the filesystem. You can grant yourself temporary access with
sudo setfacl -m u:${USER}:r /dev/sda1, if you so fancy. This will be lost at reboot.
Modules
| parse |
Raw object parsing API. Not versioned / supported. |
Structs
| DirEntry |
An entry in a directory, without its extra metadata. |
| Error |
The Error type. |
| Inode |
An actual disc metadata entry. |
| InodeFlags | |
| Options | |
| Stat |
Full information about a disc entry. |
| SuperBlock |
The critical core of the filesystem. |
| Time |
A raw filesystem time. |
Enums
| Checksums | |
| Enhanced |
Extended, type-specific information read from an inode. |
| ErrorKind |
The kind of an error. |
| FileType |
Flag indicating the type of file stored in this inode. |
Constants
Traits
| ResultExt |
Additional methods for |
Functions
| usize_check |
Type Definitions
| Result |
Convenient wrapper around |