biogeme.tools.files module¶
- biogeme.tools.files.create_backup(filename, rename=True)[source]¶
If the file exist, we create a backup copy.
- Parameters:
filename (
str
) – name of the filerename (
bool
) – if True, the file is renamed. If False, a copy is made.
- Return type:
str
- biogeme.tools.files.files_of_type(extension, name, all_files=False)[source]¶
Identify the list of files with a given extension in the local directory
- Parameters:
extension (
str
) – extension of the requested files (without the dot): ‘yaml’, or ‘html’name (
str
) – filename, without extensionall_files (
bool
) – if all_files is False, only files containing the name of the model are identified. If all_files is True, all files with the requested extension are identified.
- Return type:
list
[str
]- Returns:
list of files with the requested extension.