
    AHj                    6    d dl mZ d dlmZ 	 d	 	 	 	 	 	 	 ddZy)    )annotations)datetimeNc                    |#t        j                         j                         }n#t        j                         j                  |      }|  d| }dD ]  }|j	                  |d      } ||z   S )a  Generate a filename which includes the current date and time.

    Useful for ensuring a degree of uniqueness when saving files.

    Args:
        prefix: Prefix to attach to the start of the filename, before the timestamp string.
        suffix: Suffix to attach to the end of the filename, after the timestamp string.
            This should include the file extension.
        datetime_format: The format of the datetime to include in the filename.
            If None, the ISO format will be used.
     z <>:"/\|?*._)r   now	isoformatstrftimereplace)prefixsuffixdatetime_formatdtfile_name_stemreserveds         F/root/tools/cai/cai_env/lib/python3.12/site-packages/textual/_files.pygenerate_datetime_filenamer      sp     \\^%%'\\^$$_5xq%N" ?'//#>?F""    )N)r   strr   r   r   z
str | Nonereturnr   )
__future__r   r   r    r   r   <module>r      s6    "  =A###/9##r   