geotribu_cli.utils.file_stats module¶
Check file statistcs.
- geotribu_cli.utils.file_stats.is_file_older_than(local_file_path, expiration_rotating_hours=24, dt_reference_mode='auto')¶
Check if the creation/modification date of the specified file is older than the mount of hours.
- Paramètres:
local_file_path (Path) – local path to the index file
expiration_rotating_hours (int, optional) – number in hours to consider the local file outdated. Defaults to 24.
dt_reference_mode (Literal['auto', 'creation', 'modification'], optional) – reference date type: auto to handle differences between operating systems, creation for creation date, modification for last modification date. Defaults to « auto ».
- Renvoie:
True if the creation/modification date of the file is older than the specified number of hours.
- Type renvoyé: