file_system/fundamentals/
mod.rs

1//! Fundamental types and structures for file system operations.
2//!
3//! This module contains the core data types used throughout the file system,
4//! including paths, sizes, positions, metadata, permissions, and other essential
5//! building blocks for file system operations.
6
7mod attributes;
8mod control;
9mod entry;
10mod flags;
11mod identifiers;
12mod kind;
13mod path;
14mod permission;
15mod position;
16mod size;
17mod statistics;
18
19pub use attributes::*;
20pub use control::*;
21pub use entry::*;
22pub use flags::*;
23pub use identifiers::*;
24pub use kind::*;
25pub use path::*;
26pub use permission::*;
27pub use position::*;
28pub use size::*;
29pub use statistics::*;
30
31/// Standard block size representation for file system operations.
32///
33/// This type represents a 512-byte block, which is the standard sector size
34/// for most storage devices. It's used throughout the file system for
35/// block-aligned operations and buffer management.
36///
37/// # Examples
38///
39/// ```rust
40/// # extern crate alloc;
41/// use file_system::Block;
42///
43/// let block = Block::default();
44/// assert_eq!(block.0.len(), 512);
45/// ```
46#[repr(transparent)]
47pub struct Block(pub [u8; 512]);
48
49impl Default for Block {
50    fn default() -> Self {
51        Block([0; 512])
52    }
53}