Expand description
§Rust crate fat_fs_types
Low-level #![no_std] helper library for accessing Microsoft’s FAT12/16/32 and exFAT file systems.
Only defines constants, types and some very simple functions.
You will want to use one of the features zerocopy or bytemuck (together with the respective crate).
A lot of the structs in here only implement Copy if you have feature = "bytemuck" enabled since some of them are quite large.
All #[repr(C)] structs with public fields have a stable layout, no padding and an alignment of 1.
- EFI FAT specification: download
- exFAT specification
§License
This crate is licensed under the MIT license.
Re-exports§
Modules§
Structs§
- ChsAddr
- A cylinder-head-sector address in the format used by x86’s interrupt
0x13. - Disk
Geometry - Hard disk geometry values used by x86’s interrupt
0x13. - Pack
Date Error - Error thrown by
pack_date.
Constants§
- MAX_
BLK_ SIZE - MAX_
YEAR - MIN_
BLK_ SIZE - MIN_
YEAR - NONEXISTENT_
CLUSTERS - Number of clusters that show up at the start of the FAT but don’t correspond to a heap allocation.
Functions§
- pack_
date - Encodes
(year, month, day)into a packed native-endian FAT/exFAT date. - pack_
time - Encodes
(hours, minutes, millis)into a packed native-endian FAT/exFAT time, rounding down. - unpack_
date - Decodes a packed native-endian FAT/exFAT date into
(year, month, day). - unpack_
time - Decodes a packed native-endian FAT/exFAT time into
(hours, minutes, millis).
Type Aliases§
- Cluster
Idx - Guid
- A globally unique identifier (usually called universally unique identifier/UUID outside the Microsoft world) with mixed endianness.
- Lba
- Logical block addressing address or offset.
- U16Le
- Unaligned little-endian 16-bit integer.
- U32Le
- Unaligned little-endian 32-bit integer.
- U64Le
- Unaligned little-endian 64-bit integer.