Function ifcopenshell::path::atomic_rename_file¶
Defined in File utils.h
Function Documentation¶
-
bool ifcopenshell::path::atomic_rename_file(const std::string &old_filename, const std::string &new_filename)¶
Atomically renames old_filename onto new_filename, replacing an existing destination in a single filesystem operation. Unlike rename_file(), the destination is never unlinked before the rename, so an interruption can never leave the destination missing. This requires both paths to live on the same filesystem. Returns true on success.