github.com/eliastor/durgaform@v0.0.0-20220816172711-d0ab2d17673e/internal/replacefile/doc.go (about)

     1  // Package replacefile is a small helper package focused directly at the
     2  // problem of atomically "renaming" one file over another one.
     3  //
     4  // On Unix systems this is the standard behavior of the rename function, but
     5  // the equivalent operation on Windows requires some specific operation flags
     6  // which this package encapsulates.
     7  //
     8  // This package uses conditional compilation to select a different
     9  // implementation for Windows vs. all other platforms. It may therefore
    10  // require further fiddling in future if Durgaform is ported to another
    11  // OS that is neither Unix-like nor Windows.
    12  package replacefile