swap Function (STL)

Swaps the contents of two files.

inline void swap(
   path& Left,
   path& Right
);

Left

The left path object.

Right

The right path object.

The function modifies the file system, not just the path objects. It performs the swap by renaming Left as Right and Right as Left.

Header: filesystem

Namespace: std::tr2::sys

Show: