
    BVh                         d Z ddlZd Zd Zy)zUtilities related to disk I/O.    Nc                 d    t        | t        j                        rt        j                  |       S | S )a  Convert `PathLike` objects to their string representation.

  If given a non-string typed path object, converts it to its string
  representation.

  If the object passed to `path` is not among the above, then it is
  returned unchanged. This allows e.g. passthrough of file objects
  through this function.

  Args:
    path: `PathLike` object that represents a path

  Returns:
    A string representation of the path argument, if Python support exists.
  )
isinstanceosPathLikefspath)paths    V/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/keras/utils/io_utils.pypath_to_stringr
      s%      bkk"99T?	+    c                     t        d| z        j                         j                         }|dvr,t        d      j                         j                         }|dvr,|dk(  ryt        d       y)zProduces a prompt asking about overwriting a file.

  Args:
      filepath: the path to the file to be overwritten.

  Returns:
      True if we can proceed with overwrite, False otherwise.
  z.[WARNING] %s already exists - overwrite? [y/n])ynz&Enter "y" (overwrite) or "n" (cancel).r   Fz'[TIP] Next time specify overwrite=True!T)inputstriplowerprint)filepath	overwrites     r	   ask_to_proceed_with_overwriter   *   su      ') **/%'%%' # " ##(57557  	# #12	r   )__doc__r   r
   r    r   r	   <module>r      s     % 	*r   