Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_file/src/lib.rs

1.8 KiB, 11 runs

created by r1870400018:302, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1//! File system utilities for the Hematite ecosystem.
2//!
3//! This crate provides tools for working with file system hierarchies, with a focus on directory tree
4//! traversal and metadata handling. The primary type is [`FileTree`] which creates an in-memory
5//! representation of a directory structure.
6//!
7//! # Key Features
8//! - Tree-based directory structure representation using [`FileTree`]
9//! - File metadata tracking through [`Attributes`] including modification times and sizes
10//! - Support for both files and directories via [`Node`] variants
11//! - Integration with Hematite's error handling through [`Outcome`]
12//!
13//! # Example
14//! ```no_run
15//! use oxedyne_fe2o3_file::tree::FileTree;
16//!
17//! // Create a file tree from a directory path
18//! let tree = FileTree::new("/path/to/directory").unwrap();
19//! ```
20//!
21//! The crate builds on Hematite's core data structures and error handling patterns to provide a
22//! safe and maintainable approach to file system operations.
23//!
24//! # Archives and the formats built on them
25//!
26//! [`zip`] is an archive held in memory over bytes, written target-neutral, on the reading that an
27//! archive is a filesystem in a file. It preserves the members it does not understand, byte for byte.
28//!
29//! [`office`] is the six Office formats -- `.docx`, `.xlsx`, `.pptx` and their OpenDocument
30//! counterparts -- each of which is an archive of XML. They sit here rather than beside the document
31//! tree in `fe2o3_text::doc`, where they would read more naturally, because they cannot: `fe2o3_jdat`
32//! depends on `fe2o3_text`, so `fe2o3_text` can never depend on anything that depends on `fe2o3_jdat`,
33//! and the archive does. This crate is on the other side of that line and can use both.
34//!
35//! [Written with AI](https://need2know.ai/with-ai/code)\
36//! Anthropic Claude
37
38pub mod exif;
39pub mod glob;
40pub mod office;
41pub mod tree;
42pub mod zip;