"""Filesystem helpers — crash-safe atomic write (v0.48.0).

Stability tier: **experimental** (AP-11) — added in 0.48.0.

Public surface for the federation's crash-safe atomic write (CF-04): write to
a tempfile in the target directory, ``fsync``, ``chmod``, then atomic
``os.replace``. Used across mgf-common (vault, crash reporter, config loader,
versioned store) and now exposed publicly so siblings can adopt it instead of
reaching into the closed-box ``mgf.common._io`` private surface (AP-14 / DP-13).

    from mgf.common.io import atomic_write
    atomic_write(path, data, mode=0o600)  # durable; never a partial file
"""

from __future__ import annotations

from mgf.common._io import atomic_write

__all__ = ["atomic_write"]
