Skip to content

File config

Module for file configuration and hashing.

file_config()

Function to configure file path and print its hash.

Source code in verdict_hasher/file_config.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def file_config():
    """
    Function to configure file path and print its hash.
    """
    user_path = os.getcwd()
    print("Current directory = " + user_path)
    user_file = qy.path(
        "Input file name (supports tab completion):"
    ).ask()
    if os.path.isfile(user_file):
        file_path = user_file
        print(hash_file(file_path))
    else:
        print("File not found")