Read-only filesystem preflight / v0.1.0

Know the copy fits.
Before the first byte moves.

Scan source and destination metadata, settle overwrite conflicts, and budget sparse-file uncertainty before a long file operation can strand your archive.

cargo install file-change-space-check
  • No file changes
  • No telemetry
  • Deterministic JSON
Allocation study / 001
Blue file blocks measured on a grid before entering a disk, while an amber conflict block is diverted aside.
Measure. Resolve. Then move.

01 Scan metadata

02 Apply policy

03 Check headroom

04 Emit manifest

Policy simulator

One tree. Three very different answers.

This browser demo uses a fixed example; your files never enter the page. Change the free space and conflict rule to see the plan recompute.

When photos.raw already exists
Try 22 GB to turn this plan safe.
Preflight resultDo not start
Available
16.0 GB
Headroom needed
21.6 GB
Final net change
+15.7 GB

The overwrite is staged before 5.9 GB can be reclaimed. The upper bound exceeds available space by 5.6 GB.

Action manifest 3 entries

    What the number means

    Headroom, not wishful subtraction.

    A

    Observe

    Read sizes, allocated blocks, entry types, and destination availability. Never read file contents by default.

    B

    Reconcile

    Apply overwrite, skip, or keep-both to every relative path in lexical order.

    C

    Bound

    Report sparse files as a lower–upper range. The safer upper bound controls the verdict.

    D

    Record

    Print a human check or portable JSON manifest. It remains a plan, never an executable script.

    Small surface, useful output

    Put it before cp, not inside it.

    The tool plans source directory contents into a destination root. It does not attempt to guess your copy command or permissions.

    Read the source on GitHub
    preflight.shread only
    $ fcsc ./camera-roll /mnt/archive \
      --policy overwrite --json
    
    "verdict": "insufficient",
    "required_headroom_bytes_upper": 23192823398,
    "conflicts": 1
    
    # exit 2 · no files changed

    Honest limits

    It plans the terrain. It does not drive.