From 8640462ca3d1dcaa3d79a2a647e36f8d74376152 Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi Date: Wed, 15 Mar 2017 09:45:34 -0700 Subject: [PATCH] clarify atomic file rationale --- docs/fileutils.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/fileutils.rst b/docs/fileutils.rst index 5318cbb..90482b9 100644 --- a/docs/fileutils.rst +++ b/docs/fileutils.rst @@ -21,9 +21,14 @@ Atomic File Saving ------------------ Ideally, the road to success should never put current progress at -risk. That's why overwriting a file should only happen after the task -at hand has completed. And that's exactly what :func:`atomic_save` and -:class:`AtomicSaver` do. +risk. And that's exactly why :func:`atomic_save` and +:class:`AtomicSaver` exist. + +Using the same API as a writable file, all output is saved to a +temporary file, and when the file is closed, the old file is replaced +by the new file in a single system call, portable across all major +operating systems. No more partially-written or partially-overwritten +files. .. autofunction:: boltons.fileutils.atomic_save