replacement_filename

sunpy.util.replacement_filename(path)[source] [edit on github]

Return replacement path for already used path. Enumerates until an unused filename is found. E.g., “/home/florian/foo.fits” becomes “/home/florian/foo.0.fits”, if that is used “/home/florian/foo.1.fits”, etc.