accessmod/utils.py
def fpath_suffix(src_fpath: str, suffix: str, dst_extension: None) -> str:
    """Add a suffix (before extension) to a remote or local file path.

    Also optionally change extension of new file path.
    """
    src_extension = src_fpath.split(".")[-1]
    dst_fpath = src_fpath.replace(f".{src_extension}", f"_{suffix}.{src_extension}")
    if dst_extension:
        if src_extension != dst_extension:
            dst_fpath = dst_fpath.replace(src_extension, dst_extension)
    return dst_fpath
Add a suffix (before extension) to a remote or local file path.

    Also optionally change extension of new file path.
    
Add a suffix (before extension) to a remote or local file path.
Also optionally change extension of new file path.
Add a suffix ( before extension ) to a remote or local file path . Also optionally change extension of new file path .
def fpath_suffix(src_fpath: str, suffix: str, dst_extension: None) -> str:
    src_extension = src_fpath.split(".")[-1]
    dst_fpath = src_fpath.replace(f".{src_extension}", f"_{suffix}.{src_extension}")
    if dst_extension:
        if src_extension != dst_extension:
            dst_fpath = dst_fpath.replace(src_extension, dst_extension)
    return dst_fpath
def fpath_suffix ( src_fpath : str , suffix : str , dst_extension : None ) -> str : src_extension = src_fpath . split ( "." ) [ - 1 ] dst_fpath = src_fpath . replace ( f".{src_extension}" , f"_{suffix}.{src_extension}" ) if dst_extension : if src_extension != dst_extension : dst_fpath = dst_fpath . replace ( src_extension , dst_extension ) return dst_fpath
Add a suffix (before extension) to a remote or local file path.
Add a suffix ( before extension ) to a remote or local file path .
"""Add a suffix (before extension) to a remote or local file path.

    Also optionally change extension of new file path.
    """
src_fpath
str
suffix
str
dst_extension
None