i_vis/core/file_utils.py
def path_md5(path: str) -> str:
    """MD5 hash value for a file.

    Args:
        fname: File to calculate MD5.

    Returns:
        MD5 hash for filename.
    """

    md5h = hashlib.md5()
    for root, dirs, fnames in os.walk(path):
        for fname in fnames:
            with open(os.path.join(path, fname), "rb") as file:
                while True:
                    data = file.read(1024 * 64)
                    if not data:
                        break
                    md5h.update(data)
    return md5h.hexdigest()
MD5 hash value for a file.

    Args:
        fname: File to calculate MD5.

    Returns:
        MD5 hash for filename.
    
MD5 hash value for a file.
MD5 hash value for a file .
def path_md5(path: str) -> str:
    md5h = hashlib.md5()
    for root, dirs, fnames in os.walk(path):
        for fname in fnames:
            with open(os.path.join(path, fname), "rb") as file:
                while True:
                    data = file.read(1024 * 64)
                    if not data:
                        break
                    md5h.update(data)
    return md5h.hexdigest()
def path_md5 ( path : str ) -> str : md5h = hashlib . md5 ( ) for root , dirs , fnames in os . walk ( path ) : for fname in fnames : with open ( os . path . join ( path , fname ) , "rb" ) as file : while True : data = file . read ( 1024 * 64 ) if not data : break md5h . update ( data ) return md5h . hexdigest ( )
MD5 hash value for a file.
MD5 hash value for a file .
"""MD5 hash value for a file.

    Args:
        fname: File to calculate MD5.

    Returns:
        MD5 hash for filename.
    """
MD5 hash for filename.
MD5 hash for filename .
path
str
fname
File to calculate MD5.
File to calculate MD5 .