msmbuilder.io.backup¶
-
msmbuilder.io.
backup
(fn)¶ If
fn
exists, rename it and issue a warningThis function will rename an existing filename {fn}.bak.{i} where i is the smallest integer that gives a filename that doesn’t exist. This naively uses a while loop to find such a filename, so there shouldn’t be too many existing backups or performance will degrade.
Parameters: - fn : str
The filename to check.