github.com/opentofu/opentofu@v1.7.1/internal/replacefile/doc.go (about)

     1  // Copyright (c) The OpenTofu Authors
     2  // SPDX-License-Identifier: MPL-2.0
     3  // Copyright (c) 2023 HashiCorp, Inc.
     4  // SPDX-License-Identifier: MPL-2.0
     5  
     6  // Package replacefile is a small helper package focused directly at the
     7  // problem of atomically "renaming" one file over another one.
     8  //
     9  // On Unix systems this is the standard behavior of the rename function, but
    10  // the equivalent operation on Windows requires some specific operation flags
    11  // which this package encapsulates.
    12  //
    13  // This package uses conditional compilation to select a different
    14  // implementation for Windows vs. all other platforms. It may therefore
    15  // require further fiddling in future if OpenTofu is ported to another
    16  // OS that is neither Unix-like nor Windows.
    17  package replacefile