(folderPath, rejectSize)
walks through a folder tree and searches for exceptionally large files or folders
    Args:
        folderPath (str): path of folder to walk
        rejectSize (int): file size in bytes to possibly delete
    Returns:
        None
walks through a folder tree and searches for exceptionally large files or folders
    Args:
        folderPath (str): path of folder to walk
        rejectSize (int): file size in bytes to possibly delete
    Returns:
        None
walks through a folder tree and searches for exceptionally large files or folders Args : folderPath ( str ) : path of folder to walk rejectSize ( int ) : file size in bytes to possibly delete Returns : None
def findUnneeded(folderPath, rejectSize):
    """walks through a folder tree and searches for exceptionally large files or folders
    Args:
        folderPath (str): path of folder to walk
        rejectSize (int): file size in bytes to possibly delete
    Returns:
        None
    """
    root = os.path.abspath(folderPath)

    for doc in os.listdir(root):

        docPath = os.path.join(root, doc)

        if os.path.isdir(docPath):
            size = getDirSize(docPath)
        else:
            size = os.path.getsize(docPath)

        if size > rejectSize:
            print(f'{docPath}: {size}')
def findUnneeded ( folderPath , rejectSize ) : root = os . path . abspath ( folderPath ) for doc in os . listdir ( root ) : docPath = os . path . join ( root , doc ) if os . path . isdir ( docPath ) : size = getDirSize ( docPath ) else : size = os . path . getsize ( docPath ) if size > rejectSize : print ( f'{docPath}: {size}' )