ΒΆllvm::Error writeFileAtomically(
    llvm::StringRef TempPathModel,
    llvm::StringRef FinalPath,
    llvm::StringRef Buffer)

Description

Creates a unique file with name according to the given \p TempPathModel, writes content of \p Buffer to the file and renames it to \p FinalPath.

Declared at: llvm/include/llvm/Support/FileUtilities.h:107

Parameters

llvm::StringRef TempPathModel
llvm::StringRef FinalPath
llvm::StringRef Buffer

Returns

\c AtomicFileWriteError in case of error.