Safe file operations - atomic write, safe append, line editing
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/fileops |
| Edition | 2021 |
| Targets | infrastructure_fileops |
| Public items | 0 across 0 modules |
| Tests | 23 |
What it is for
This crate does not document itself. No //! block on its entry point. The facts below are complete; the reason this crate exists is not written down anywhere, and belongs in src/lib.rs rather than here.
Capabilities
No public items.
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
No public items.
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
AtomicWrite | atomic_write::AtomicWrite |
LineEditor | line_editor::LineEditor |
SafeAppend | safe_append::SafeAppend |
Boundary
Depends on no other workspace tier.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/fileops |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
base64 | ^0.22 | — | no | always |
libc | ^0.2 | — | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tempfile | ^3 | — | no | always |
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_fileops["application-fileops"] -->|uses| SELF SELF["infrastructure-fileops"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_fileops | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
1 workspace crate depends on this one: application-fileops.
Verification
| Kind | Count |
|---|---|
| Unit tests | 23 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
What the tests establish, by name:
test_atomic_write_base64—src/atomic_write.rstest_atomic_write_creates_file—src/atomic_write.rstest_atomic_write_creates_parent_dirs—src/atomic_write.rstest_atomic_write_overwrites—src/atomic_write.rstest_atomic_write_with_mode—src/atomic_write.rstest_no_temp_file_left_behind—src/atomic_write.rstest_no_trailing_newline_preserved—src/line_editor.rstest_preserves_trailing_newline—src/line_editor.rstest_remove_first_line—src/line_editor.rstest_remove_last_line—src/line_editor.rstest_remove_line_by_content—src/line_editor.rstest_remove_line_multiple_matches—src/line_editor.rstest_remove_line_no_match—src/line_editor.rstest_remove_line_number—src/line_editor.rstest_remove_line_number_out_of_range—src/line_editor.rstest_remove_line_number_zero_errors—src/line_editor.rstest_remove_line_trimmed_match—src/line_editor.rstest_append_creates_file—src/safe_append.rstest_append_multiple_lines—src/safe_append.rstest_append_preserves_existing_newline—src/safe_append.rstest_append_unless_present_allows_different—src/safe_append.rstest_append_unless_present_skips_duplicate—src/safe_append.rstest_append_unless_present_trims_for_comparison—src/safe_append.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 0 |
Public modules with a //! block | 0 | 0 |
Metrics
| Metric | Value |
|---|---|
| Rust source files | 4 |
| Source lines | 521 |
| Code lines | 362 |
| Public API items | 0 |
| Public modules | 0 |
| Tests | 23 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 3 |
| Workspace reverse dependencies | 1 |
pie showData
title Rust source composition
"Code" : 362
"Blank or comment" : 159
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.