Logo

Programming-Idioms

  • Kotlin
  • C++

Idiom #343 Rename file

Rename the file at path1 into path2

#include <filesystem>
std::filesystem::rename(path1, path2);

Requires C++17.
#include <stdio.h>
rename(path1, path2);

New implementation...
< >
programming-idioms.org