ClickHouse/src/Common/renameat2.h
Alexander Tokmakov 15e7ce0053 fixes
2020-04-23 21:00:43 +03:00

18 lines
508 B
C++

#pragma once
#include <string>
namespace DB
{
/// Returns true, if the following functions supported by the system
bool supportsRenameat2();
/// Atomically rename old_path to new_path. If new_path exists, do not overwrite it and throw exception
void renameNoReplace(const std::string & old_path, const std::string & new_path);
/// Atomically exchange oldpath and newpath. Throw exception if some of them does not exist
void renameExchange(const std::string & old_path, const std::string & new_path);
}