(fpath)
| 3838 | |
| 3839 | |
| 3840 | def _get_fpath_not_existing(fpath): |
| 3841 | # Returns path to the new file that is guaranteed to not exist |
| 3842 | # The function cycles through paths obtained by inserting |
| 3843 | # version number between name and extension in the prototype path ``fpath`` |
| 3844 | # The version number is inserted in the form ``filename_v2.ext`` |
| 3845 | |
| 3846 | if os.path.exists(fpath): |
| 3847 | p, e = os.path.splitext(fpath) |
| 3848 | n = 1 |
| 3849 | while True: |
| 3850 | fpath = f"{p}_v{n}{e}" |
| 3851 | if not os.path.exists(fpath): |
| 3852 | break |
| 3853 | n += 1 |
| 3854 | return fpath |
| 3855 | |
| 3856 | |
| 3857 | def save_data_to_hdf5( |
no outgoing calls
no test coverage detected