PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ move_if_exists()

void pism::io::move_if_exists ( MPI_Comm  com,
const std::string &  file_to_move,
int  rank_to_use 
)

Moves the file aside (file.nc -> file.nc~).

Note: only one processor does the renaming.

Definition at line 1362 of file io_helpers.cc.

References pism::RuntimeError::formatted(), and PISM_ERROR_LOCATION.

Referenced by pism::File::open().